#adk #telemetry #tracing #api-bindings #ai-agent

adk-telemetry

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

15 releases

Uses new Rust 2024

new 0.3.2 Feb 21, 2026
0.3.1 Feb 15, 2026
0.2.1 Jan 22, 2026
0.1.9 Jan 3, 2026
0.1.1 Nov 30, 2025

#983 in Debugging

Download history 3/week @ 2025-11-29 43/week @ 2025-12-06 7/week @ 2025-12-13 8/week @ 2026-01-03 1/week @ 2026-01-10 24/week @ 2026-01-17 73/week @ 2026-01-24 48/week @ 2026-01-31 38/week @ 2026-02-07 63/week @ 2026-02-14

224 downloads per month
Used in 10 crates (6 directly)

Apache-2.0

25KB
337 lines

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.3.2"

Or use the meta-crate:

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

Quick Start

use adk_telemetry::init_telemetry;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize with service name
    init_telemetry("my-agent")?;

    // Your agent code here...
    Ok(())
}

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::init_with_otlp;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    init_with_otlp("my-agent", "http://localhost:4317")?;
    
    // Your agent code here...
    Ok(())
}

Available Functions

Function Description
init_telemetry(service_name) Basic console logging
init_with_otlp(service_name, endpoint) OTLP export to collectors
init_with_adk_exporter(service_name) ADK-style span exporter
shutdown_telemetry() Flush and shutdown

Re-exports

Convenience re-exports from tracing:

use adk_telemetry::{info, debug, warn, error, trace, instrument, Span};

Features

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

License

Apache-2.0

Part of ADK-Rust

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

Dependencies

~16–22MB
~293K SLoC