Skip to main content

Module telemetry

Module telemetry 

Source
Available on crate feature telemetry only.
Expand description

OpenTelemetry Integration

Provides OTLP export configuration and initialization functions, integrating with the existing tracing infrastructure. Also provides Metrics infrastructure (Counter / Histogram) for recording key indicators such as LLM calls, Token usage, and tool execution.

§Usage

use echo_agent::telemetry::{TelemetryConfig, init_telemetry, shutdown_telemetry};

init_telemetry(TelemetryConfig::default())?;

// ... Run Agent ...

shutdown_telemetry();

Structs§

Metrics
Agent runtime metrics
TelemetryConfig
OpenTelemetry configuration

Functions§

init_telemetry
Initialize OpenTelemetry tracing + metrics
shutdown_telemetry
Shutdown OpenTelemetry, flush pending spans and metrics