Observability
Monitor and debug AI agents with OpenTelemetry-based distributed tracing and metrics
ADK-TS provides built-in observability through OpenTelemetry integration. Monitor your agents' performance, trace execution flows, collect metrics, and gain insights into LLM interactions, tool usage, and agent behavior.
Built-in Support
All telemetry dependencies are included in @iqai/adk. No additional packages
required.
What You'll Learn
This section covers everything you need to know about observability in ADK-TS:
- Setting up telemetry - Initialize and configure the telemetry service
- Distributed tracing - Track agent invocations, tool executions, and LLM calls
- Metrics collection - Monitor performance with counters and histograms
- Platform integrations - Connect to Jaeger, Grafana, Datadog, and more
- Production deployment - Privacy controls, performance tuning, and best practices
Key Features
| Feature | Description |
|---|---|
| Distributed Tracing | Track agent invocations, tool executions, and LLM calls across your system |
| Metrics Collection | Monitor performance with counters, histograms, and token usage tracking |
| Auto-Instrumentation | Optional automatic tracing of HTTP calls and database queries |
| Privacy Controls | Configurable content capture for production environments |
| Platform Integration | Works with Jaeger, Grafana, Datadog, New Relic, Honeycomb, and any OTLP-compatible backend |
Quick Example
import { telemetryService, AgentBuilder } from "@iqai/adk";
// Initialize telemetry before any agent operations
await telemetryService.initialize({
appName: "my-agent-app",
otlpEndpoint: "http://localhost:4318/v1/traces",
appVersion: "1.0.0",
enableMetrics: true,
enableTracing: true,
});
// Your agents automatically send traces and metrics
const response = await AgentBuilder.withModel("gemini-2.5-flash").ask("Hello!");
console.log(response);
// Shutdown gracefully to flush pending telemetry
await telemetryService.shutdown(5000);Related Topics
🚀 Getting Started
Initialize and configure telemetry for local development
🔍 Distributed Tracing
Understand what gets traced and how to create custom spans
📊 Metrics
Monitor agent performance with counters and histograms
🔌 Platform Integrations
Connect to Jaeger, Grafana, Datadog, and other backends
🔒 Production Deployment
Privacy controls, performance tuning, and best practices