Description
Add support for Dynatrace as an observability backend, enabling users to query OpenTelemetry traces from Dynatrace environments.
Motivation
Dynatrace is a widely used enterprise observability platform with strong OpenTelemetry support. Adding Dynatrace backend support would enable organizations using Dynatrace to leverage this MCP server for AI-powered trace analysis and debugging.
Implementation Requirements
1. Backend Implementation
- Create
src/openllmetry_mcp/backends/dynatrace.py following the abstract interface in backends/base.py
- Implement the following methods:
search_traces() - Query traces using Dynatrace Trace API
get_trace() - Retrieve full trace details
list_services() - List available services
get_aggregated_usage() - Aggregate token usage metrics
2. Configuration
- Add
dynatrace as a backend type option
- Required configuration:
BACKEND_URL: Dynatrace environment URL (e.g., https://{your-environment-id}.live.dynatrace.com)
BACKEND_API_KEY: Dynatrace API token with trace read permissions
- Update
.env.example with Dynatrace configuration example
3. API Integration
Reference Dynatrace APIs:
4. OpenLLMetry Support
Ensure proper parsing of OpenLLMetry semantic conventions (gen_ai.* attributes) from Dynatrace trace spans.
5. Documentation
- Add Dynatrace backend configuration to README.md
- Include Claude Desktop integration example
- Add troubleshooting section for common Dynatrace connection issues
6. Testing
- Add unit tests in
tests/backends/test_dynatrace.py
- Test trace querying, filtering, and aggregation
- Test error handling and authentication
Example Configuration
BACKEND_TYPE=dynatrace
BACKEND_URL=https://abc12345.live.dynatrace.com
BACKEND_API_KEY=dt0c01.ABC123...
References
Acceptance Criteria
Description
Add support for Dynatrace as an observability backend, enabling users to query OpenTelemetry traces from Dynatrace environments.
Motivation
Dynatrace is a widely used enterprise observability platform with strong OpenTelemetry support. Adding Dynatrace backend support would enable organizations using Dynatrace to leverage this MCP server for AI-powered trace analysis and debugging.
Implementation Requirements
1. Backend Implementation
src/openllmetry_mcp/backends/dynatrace.pyfollowing the abstract interface inbackends/base.pysearch_traces()- Query traces using Dynatrace Trace APIget_trace()- Retrieve full trace detailslist_services()- List available servicesget_aggregated_usage()- Aggregate token usage metrics2. Configuration
dynatraceas a backend type optionBACKEND_URL: Dynatrace environment URL (e.g.,https://{your-environment-id}.live.dynatrace.com)BACKEND_API_KEY: Dynatrace API token with trace read permissions.env.examplewith Dynatrace configuration example3. API Integration
Reference Dynatrace APIs:
Authorizationheader4. OpenLLMetry Support
Ensure proper parsing of OpenLLMetry semantic conventions (
gen_ai.*attributes) from Dynatrace trace spans.5. Documentation
6. Testing
tests/backends/test_dynatrace.pyExample Configuration
References
backends/jaeger.py,backends/tempo.py,backends/traceloop.pyAcceptance Criteria