Skip to content

Commit 47b4d8e

Browse files
committed
Add support for Dynatrace backend
1 parent 541cf3e commit 47b4d8e

File tree

7 files changed

+972
-24
lines changed

7 files changed

+972
-24
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ LOG_LEVEL=INFO
2424

2525
# Optional: Maximum traces per query (default: 100, max: 1000)
2626
MAX_TRACES_PER_QUERY=100
27+
# Optional: Dynatrace specific configuration
28+
BACKEND_TYPE=dynatrace
29+
BACKEND_URL=https://abc12345.live.dynatrace.com
30+
BACKEND_

README.md

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ pip install opentelemetry-mcp
440440

441441
### Core Capabilities
442442

443-
- **🔌 Multiple Backend Support** - Connect to Jaeger, Grafana Tempo, or Traceloop
443+
- **🔌 Multiple Backend Support** - Connect to Jaeger, Grafana Tempo, Traceloop, or Dynatrace
444444
- **🤖 LLM-First Design** - Specialized tools for analyzing AI application traces
445445
- **🔍 Advanced Filtering** - Generic filter system with powerful operators
446446
- **📊 Token Analytics** - Track and aggregate LLM token usage across models and services
@@ -463,14 +463,14 @@ pip install opentelemetry-mcp
463463

464464
### Backend Support Matrix
465465

466-
| Feature | Jaeger | Tempo | Traceloop |
467-
| ---------------- | :----: | :---: | :-------: |
468-
| Search traces ||||
469-
| Advanced filters ||||
470-
| Span search |\* |||
471-
| Token tracking ||||
472-
| Error traces ||||
473-
| LLM tools ||||
466+
| Feature | Jaeger | Tempo | Traceloop | Dynatrace |
467+
| ---------------- | :----: | :---: | :-------: | :-------: |
468+
| Search traces |||||
469+
| Advanced filters |||||
470+
| Span search |\* ||||
471+
| Token tracking |||||
472+
| Error traces |||||
473+
| LLM tools |||||
474474

475475
<sub>\* Jaeger requires `service_name` parameter for span search</sub>
476476

@@ -496,11 +496,12 @@ uv pip install -e ".[dev]"
496496

497497
### Supported Backends
498498

499-
| Backend | Type | URL Example | Notes |
500-
| ------------- | ----------- | --------------------------- | -------------------------- |
501-
| **Jaeger** | Local | `http://localhost:16686` | Popular open-source option |
502-
| **Tempo** | Local/Cloud | `http://localhost:3200` | Grafana's trace backend |
503-
| **Traceloop** | Cloud | `https://api.traceloop.com` | Requires API key |
499+
| Backend | Type | URL Example | Notes |
500+
| ------------- | ----------- | ---------------------------------------- | -------------------------- |
501+
| **Jaeger** | Local | `http://localhost:16686` | Popular open-source option |
502+
| **Tempo** | Local/Cloud | `http://localhost:3200` | Grafana's trace backend |
503+
| **Traceloop** | Cloud | `https://api.traceloop.com` | Requires API key |
504+
| **Dynatrace** | Cloud | `https://{env-id}.live.dynatrace.com` | Requires API token |
504505

505506
### Quick Configuration
506507

@@ -525,7 +526,7 @@ opentelemetry-mcp --backend traceloop --url https://api.traceloop.com --api-key
525526

526527
| Variable | Type | Default | Description |
527528
| ---------------------- | ------- | -------- | -------------------------------------------------- |
528-
| `BACKEND_TYPE` | string | `jaeger` | Backend type: `jaeger`, `tempo`, or `traceloop` |
529+
| `BACKEND_TYPE` | string | `jaeger` | Backend type: `jaeger`, `tempo`, `traceloop`, or `dynatrace` |
529530
| `BACKEND_URL` | URL | - | Backend API endpoint (required) |
530531
| `BACKEND_API_KEY` | string | - | API key (required for Traceloop) |
531532
| `BACKEND_TIMEOUT` | integer | `30` | Request timeout in seconds |
@@ -581,6 +582,50 @@ BACKEND_API_KEY=your_api_key_here
581582

582583
> **Note:** The API key contains project information. The backend uses a project slug of `"default"` and Traceloop resolves the actual project/environment from the API key.
583584
585+
### Dynatrace
586+
587+
```bash
588+
BACKEND_TYPE=dynatrace
589+
BACKEND_URL=https://abc12345.live.dynatrace.com
590+
BACKEND_API_KEY=dt0c01.ABC123...
591+
```
592+
593+
**Configuration Details:**
594+
- **BACKEND_URL**: Your Dynatrace environment URL (format: `https://{your-environment-id}.live.dynatrace.com`)
595+
- **BACKEND_API_KEY**: Dynatrace API token with trace read permissions
596+
597+
**Creating a Dynatrace API Token:**
598+
1. Log in to your Dynatrace environment
599+
2. Go to **Settings****Integration****Dynatrace API**
600+
3. Click **Generate new token**
601+
4. Select scopes: **Read traces** (and optionally **Read entities** for service discovery)
602+
5. Copy the token and use it as `BACKEND_API_KEY`
603+
604+
**Claude Desktop Integration Example:**
605+
606+
```json
607+
{
608+
"mcpServers": {
609+
"opentelemetry-mcp": {
610+
"command": "pipx",
611+
"args": ["run", "opentelemetry-mcp"],
612+
"env": {
613+
"BACKEND_TYPE": "dynatrace",
614+
"BACKEND_URL": "https://abc12345.live.dynatrace.com",
615+
"BACKEND_API_KEY": "dt0c01.ABC123..."
616+
}
617+
}
618+
}
619+
}
620+
```
621+
622+
**Troubleshooting Dynatrace Connection:**
623+
624+
- **401 Unauthorized**: Verify your API token has the correct permissions (Read traces scope)
625+
- **404 Not Found**: Check that your BACKEND_URL is correct (should include environment ID)
626+
- **Connection Timeout**: Ensure your network can reach the Dynatrace environment
627+
- **No Traces Found**: Verify that OpenTelemetry traces are being sent to Dynatrace and check the time range of your queries
628+
584629
</details>
585630

586631
---

0 commit comments

Comments
 (0)