adk-telemetry 0.1.9

OpenTelemetry integration for Rust Agent Development Kit (ADK-Rust) agent observability
Documentation

adk-telemetry

OpenTelemetry integration for Rust Agent Development Kit (ADK-Rust) agent observability.

Crates.io Documentation License

Overview

adk-telemetry provides observability infrastructure for the Rust Agent Development Kit (ADK-Rust), including:

  • Tracing - Distributed tracing with OpenTelemetry
  • Logging - Structured logging with tracing-subscriber
  • Metrics - Performance metrics export
  • Span Context - Propagation across agent boundaries

Installation

[dependencies]
adk-telemetry = "0.1.8"

Or use the meta-crate:

[dependencies]
adk-rust = { version = "0.1.8", features = ["telemetry"] }

Quick Start

use adk_telemetry::init_tracing;

fn main() {
    // Initialize with environment filter
    init_tracing();

    // Your agent code here...
}

Configuration

Set the RUST_LOG environment variable:

# Debug logging for ADK
RUST_LOG=adk=debug cargo run

# Trace level for specific modules
RUST_LOG=adk_agent=trace,adk_model=debug cargo run

OpenTelemetry Export

Configure OTLP export for distributed tracing:

use adk_telemetry::TelemetryConfig;

let config = TelemetryConfig::builder()
    .service_name("my-agent")
    .otlp_endpoint("http://localhost:4317")
    .build();

init_with_config(config);

Features

  • Zero-config defaults with sensible logging
  • OpenTelemetry-compatible span export
  • Automatic context propagation
  • JSON or pretty-print log formats

Related Crates

License

Apache-2.0

Part of ADK-Rust

This crate is part of the ADK-Rust framework for building AI agents in Rust.