dynatrace-oss/dynatrace-ai-agent-instrumentation-examples
Acerca de
Dynatrace AI Observability OTel instrumentation examples
Sistemas e infraestructuraCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- +1
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalDynatrace Agentic AI Instrumentation Examples
This project demonstrates how to instrument AI agents with Dynatrace to gain observability into Agentic AI workloads, including performance, cost, and runtime behavior.
By integrating Dynatrace with AI agents, developers can monitor agent execution, understand tool interactions, trace prompt and response flows, and analyze dependencies across distributed AI-driven systems.
Telemetry can be shipped directly via OneAgent or the OpenTelemetry (OTel) SDK, or routed through an OTel Collector — including the Dynatrace Distribution of the OpenTelemetry Collector and Dynatrace Bindplane Distribution of OpenTelemetry Collector.
Key Features
Runtime Observability for AI Agents
Monitor AI agent interactions, tool usage, service dependencies, performance metrics, token consumption, and cost drivers—providing end-to-end visibility into how AI agent workflows behave at runtime.

Agent Execution Tracing and Debugging
Trace agent execution from the initial request through prompt flows, tool calls, and service interactions to the final response—enabling faster debugging and root cause analysis across complex agent workflows.

AI-Powered Workflow Insights
Use Dynatrace Intelligence to identify bottlenecks, optimize resource utilization, and understand how complex agent workflows behave across distributed services.

LLM Evaluations
Evaluate AI agent responses at scale with built-in evaluation criteria—assess faithfulness, PII leakage, bias, context relevance, and user frustration across all prompts in your tenant.

Fast Agent Instrumentation
Add Dynatrace instrumentation to AI agents in minutes using simple integration patterns and practical examples—bringing runtime observability directly into agent development workflows.
Who This Repository Is For
This repository is designed for:
- Developers building AI-powered applications
- Platform and DevOps engineers operating AI systems
- AI practitioners working with agent frameworks
If you're building AI agents, copilots, chatbots, or autonomous systems, these examples will help you add observability to your agent workflows and gain deeper insight into how your AI systems operate in production.
Coding Agent Observability
AI coding agents like Claude Code and OpenAI Codex CLI run autonomously in developer environments — writing, editing, and committing code on your behalf. Dynatrace gives engineering teams full visibility into how these agents operate across the organization, with zero code changes required. By capturing built-in OpenTelemetry signals, you can monitor token consumption, costs, session activity, and tool behavior in real time.
- Cost & token tracking — understand spend per model, per user, and per team
- Engineering metrics — lines of code added/removed, git commits, and pull requests created by AI
- Tool observability — trace every tool call, acceptance/rejection decision, and API error
- Session-level attribution — slice all data by
user.id,session.id, ororganization.id
See the AI Coding Agents section for setup guides covering Antigravity, Claude Code, Cursor, GitHub Copilot in VS Code, Kiro, OpenAI Codex CLI, OpenClaw, OpenCode, and the GitHub Copilot SDK.
Demos
SDK + Instrumentation Demos
Monitor specific AI provider SDKs with Dynatrace.
| Provider | SDK version | OneAgent | OpenInference | OpenTelemetry |
|---|---|---|---|---|
| AWS Bedrock | boto3 1.44.18 |
✓ | ✓ |
✓ |
| Anthropic | anthropic 1.12.1 |
✓ | ✓ |
— |
| Cohere | cohere 7.3.2 |
✓ | ✓ |
— |
| Gemini | google-genai 2.34.0 |
— | ✓ |
— |
| Groq | groq 1.7.0 |
✓ | ✓ |
— |
| Microsoft Foundry | azure-ai-projects 2.11.0 |
✓* | — | — |
| Together AI | together 2.41.0 |
— | ✓ |
— |
| Mistral | mistralai 3.7.0 |
✓ | ✓ |
— |
| Ollama | ollama 0.6.5 |
✓ | ✓ |
— |
| OpenAI | openai 3.61.0 |
✓ | ✓ |
✓ |
| vLLM | vllm 0.33.0 |
— | ✓ | — |
* Experimental sensor — prompt input and output capture not yet supported.
Includes an OTel Collector configuration — compatible with the Dynatrace Distribution of the OpenTelemetry Collector and Dynatrace Bindplane Distribution of OpenTelemetry Collector.
Agent Framework Demos
Monitor AI agent frameworks with Dynatrace.
| Framework | SDK version | OneAgent | OpenInference | OpenTelemetry |
|---|---|---|---|---|
| AWS Bedrock Agents | boto3 1.44.18 |
✓ | — | — |
| AWS Bedrock AgentCore | boto3 1.44.18 |
✓ | — | ✓ |
| AWS Strands Agents | strands-agents 1.65.0 |
✓ | — | ✓ |
| Claude Agent SDK | claude-agent-sdk 0.2.189 |
✓ | — | — |
| CrewAI | crewai 1.15.49 |
✓* | ✓ |
— |
| Google ADK | google-adk 2.14.1 |
✓ | ✓ |
✓ |
| Haystack | haystack-ai 3.5.0 |
✓ | ✓ |
— |
| LlamaIndex | llama-index-core 0.14.26 |
— | ✓ |
— |
| LangChain | langchain-core 1.8.1 |
✓* | — | — |
| LangGraph | langgraph 1.2.25 |
✓ | ✓ |
✓ OpenAI |
| LiteLLM | litellm 1.110.0 |
✓ | — | ✓ |
| MCP (Model Context Protocol) | @modelcontextprotocol/sdk 1.32.2 |
— | — | ✓ |
| Microsoft Agent Framework | agent-framework 1.26.0 |
— | — | ✓ |
| n8n | n8n 2.49.0 |
— | — | ✓ |
| OGX | ogx 1.5.0 |
✓ | — | ✓ |
| OpenAI Agents SDK | openai-agents 0.24.0 |
— | ✓ |
✓ |
| Pydantic AI | pydantic-ai 2.69.0 |
— | — | ✓ |
| Real User Monitoring | — | — | — | ✓ |
* Experimental sensor — prompt input and output capture not yet supported. For LangChain, the LangChain sensor itself is not experimental, but the Google GenAI and Anthropic sensors underneath it are.
Includes an OTel Collector configuration — compatible with the Dynatrace Distribution of the OpenTelemetry Collector and Dynatrace Bindplane Distribution of OpenTelemetry Collector.
AI Coding Agent Demos
Observe AI coding agents with zero code changes using built-in OpenTelemetry signals.
| Agent | SDK version | Path |
|---|---|---|
| Antigravity | — | ai-coding-agents/antigravity |
| Claude Code | — | ai-coding-agents/claude-code |
| Cursor | — | ai-coding-agents/cursor |
| GitHub Copilot in VS Code | — | ai-coding-agents/vscode-copilot |
| GitHub Copilot SDK | @github/copilot-sdk 1.0.34 |
ai-coding-agents/github-copilot-sdk |
| Kiro | — | ai-coding-agents/kiro |
| OpenAI Codex | — | ai-coding-agents/openai-codex |
| OpenClaw | — | ai-coding-agents/openclaw |
| OpenClaw Observability Plugin | — | ai-coding-agents/openclaw-observability-plugin |
| OpenCode | — | ai-coding-agents/opencode |
Getting Started
Prerequisites
make- uv — the Python demos use it to install dependencies (
make install) and run the app (make run); it can also fetch the required Python version - Docker — for demos that run a local OpenTelemetry collector or build container images
- A Dynatrace tenant — start a free trial at https://dt-url.net/trial
A few demos (n8n, ai-coding-agents/claude-code, ai-coding-agents/github-copilot-sdk, ai-coding-agents/antigravity) use npm, Docker, or pip instead of uv. Each demo's README lists its exact prerequisites.
Run a demo
Each demo follows the same interface:
cd <sdk>/<instrumentation>
make install # install dependencies
make run # start app on port 8000
make request # send a test request (in a second terminal)
All demos expose make help for the full list of targets.
If you're using a framework that isn't listed here, don't worry! You can explore the Dynatrace Hub for the full list of supported technologies.
Explorar proyectos relacionados
Cargando…