TypeScriptADK-TS

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

FeatureDescription
Distributed TracingTrack agent invocations, tool executions, and LLM calls across your system
Metrics CollectionMonitor performance with counters, histograms, and token usage tracking
Auto-InstrumentationOptional automatic tracing of HTTP calls and database queries
Privacy ControlsConfigurable content capture for production environments
Platform IntegrationWorks 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);