Connect to Dynatrace platform for real-time observability data, security insights, logs, metrics, and automated incident investigation directly in your AI workflow.
Connect your AI assistant to the Dynatrace observability platform for real-time production insights, contextual debugging, security analysis, and automated incident investigation.
This skill integrates Dynatrace's Model Context Protocol (MCP) server into your AI workflow, enabling you to:
Before using this skill, you need:
1. **Dynatrace Environment URL** - Your Dynatrace platform URL (format: `https://abc12345.apps.dynatrace.com`)
2. **Authentication** (one of):
- `DT_PLATFORM_TOKEN` - Dynatrace Platform Token (recommended)
- OAuth credentials (`OAUTH_CLIENT_ID` + `OAUTH_CLIENT_SECRET`)
Add the Dynatrace MCP server to your AI assistant's configuration:
**For Claude Code / VS Code:**
Create or update `.vscode/mcp.json` in your workspace:
```json
{
"servers": {
"dynatrace": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"cwd": "${workspaceFolder}",
"envFile": "${workspaceFolder}/.env"
}
}
}
```
**For Claude Desktop:**
Update `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"dynatrace": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://your-env.apps.dynatrace.com"
}
}
}
}
```
Create a `.env` file in your workspace root (or set globally):
```bash
DT_ENVIRONMENT=https://abc12345.apps.dynatrace.com
DT_PLATFORM_TOKEN=dt0s16.SAMPLE.abcd1234
DT_GRAIL_QUERY_BUDGET_GB=1000
```
After configuration, restart your AI assistant to load the Dynatrace MCP server.
Ask questions in plain English - the AI will translate them to DQL and retrieve data:
**Examples:**
For advanced users, execute DQL queries directly:
**Example prompts:**
Use the built-in 4-phase investigation workflow:
**Example prompt:**
The AI will automatically:
1. Gather problem context and affected entities
2. Analyze distributed traces and request flows
3. Correlate logs with trace IDs
4. Generate root cause summary with remediation steps
Query vulnerability and compliance data:
**Example prompts:**
Get detailed information about monitored entities:
**Example prompts:**
**IMPORTANT:** Querying Dynatrace Grail storage incurs costs based on GB scanned. To control costs:
1. **Set a budget limit:**
```bash
DT_GRAIL_QUERY_BUDGET_GB=500 # Set your session budget in GB
```
2. **Start with narrow timeframes:**
- Use `last 12h` or `last 24h` instead of `last 7d`
- Limit results with `| limit 100`
3. **Use buckets to reduce scan volume:**
- Specify bucket names in DQL queries (e.g., `bucket: "default"`)
4. **Monitor your usage:**
Execute this DQL to see historical consumption:
```
fetch dt.system.events
| filter event.kind == "QUERY_EXECUTION_EVENT"
and contains(client.client_context, "dynatrace-mcp")
| sort timestamp desc
| fields timestamp, query_string, scanned_bytes, table, user.email
| makeTimeSeries sum(scanned_bytes), by: { user.email, table }
```
The MCP server will warn you when approaching 80% of your budget and alert when exceeded.
1. **Create workspace rules** - Add a `.github/copilot-instructions.md` or `.amazonq/rules/` file with DQL filter patterns for your services:
```markdown
# Observability
To query data for our 'payment-service' app:
- Use filter: `contains(entity.name, "payment-service")`
- For logs: `fetch logs | filter contains(container.name, "payment-service")`
- For errors: add `| filter loglevel == "ERROR"`
```
2. **Use natural language first** - Let the AI translate to DQL rather than writing queries manually
3. **Start narrow, then expand** - Begin with short timeframes and specific entities, then broaden scope if needed
4. **Leverage AI-powered features**:
- Ask the AI to explain complex DQL queries
- Request natural language to DQL conversion
- Use the chat assistant for Dynatrace guidance
**"MCP server not found"**
**"Authentication failed"**
**"Budget exceeded"**
For issues, feature requests, or questions:
**Note:** This is a community project, not officially supported by Dynatrace.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/dynatrace-observability-integration/raw