Skip to main content

Crate adk_telemetry

Crate adk_telemetry 

Source
Expand description

§ADK Telemetry

Production-grade observability for ADK using structured logging and distributed tracing.

§Features

  • Structured logging with tracing
  • OpenTelemetry integration for distributed tracing
  • OTLP export for observability backends (Jaeger, Datadog, etc.)
  • Automatic context propagation

§Usage

use adk_telemetry::{init_telemetry, info, instrument};

fn main() -> Result<(), adk_telemetry::TelemetryError> {
    // Initialize telemetry in your main
    init_telemetry("my-service")?;

    // Use logging macros
    #[instrument]
    async fn my_function() {
        info!("Function called");
    }
    Ok(())
}

Re-exports§

pub use init::TelemetryError;
pub use init::init_telemetry;
pub use init::init_with_adk_exporter;
pub use init::shutdown_telemetry;
pub use spans::*;
pub use span_exporter::*;

Modules§

init
Telemetry initialization and configuration
instrument
Attach a span to a std::future::Future.
span_exporter
spans
Span helpers for common ADK operations

Macros§

debug
Constructs an event at the debug level.
error
Constructs an event at the error level.
info
Constructs an event at the info level.
trace
Constructs an event at the trace level.
warn
Constructs an event at the warn level.

Structs§

Span
A handle representing a span, with the capability to enter the span if it exists.

Attribute Macros§

instrument
Instruments a function to create and enter a tracing span every time the function is called.