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<(), Box<dyn std::error::Error>> {
    // 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::init_telemetry;
pub use init::init_with_otlp;
pub use init::shutdown_telemetry;
pub use spans::*;

Modules§

global
Utilities for working with global telemetry primitives
init
Telemetry initialization and configuration
instrument
Attach a span to a std::future::Future.
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§

Meter
Provides access to instrument instances for recording measurements.
Span
A handle representing a span, with the capability to enter the span if it exists.

Traits§

MeterProvider
Provides access to named Meter instances, for instrumenting an application or crate.

Attribute Macros§

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