Available on crate feature
telemetry only.Expand description
Telemetry (OpenTelemetry integration).
Production observability:
- Distributed tracing
- Metrics collection
- Log correlation
Available with feature: telemetry
Modules§
- config
genai-semconv - Runtime configuration for semantic convention emission.
- events
genai-semconv - Content event emitter for opt-in prompt/completion capture.
- init
- Telemetry initialization and configuration
- instrument
- Attach a span to a
std::future::Future. - semconv
genai-semconv - OpenTelemetry GenAI Semantic Convention attribute constants and helpers.
- 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§
- AdkSpan
Exporter - ADK-Go style span exporter that stores spans by event_id Follows the pattern from APIServerSpanExporter in ADK-Go
- AdkSpan
Layer - Tracing layer that captures spans and exports them via AdkSpanExporter
- GenAi
Response Recorder - Records response-time attributes on the current span.
- GenAi
Span Builder - Builder for creating model call spans with full OTel GenAI semconv attributes.
- LlmUsage
- Token usage data for recording on tracing spans.
- Span
- A handle representing a span, with the capability to enter the span if it exists.
Enums§
- GenAi
Operation - Well-known GenAI operation names per OTel semconv.
- GenAi
Provider - Well-known GenAI provider identifiers per OTel semconv registry.
- Telemetry
Error - Error returned by telemetry initialization functions.
Functions§
- add_
context_ attributes - Add common attributes to the current span
- agent_
run_ span - Create a span for agent execution
- callback_
span - Create a span for callback execution
- init_
telemetry - Initialize basic telemetry with console logging.
- init_
with_ adk_ exporter - Initialize telemetry with ADK span exporter.
- llm_
generate_ span - Create a span for LLM generate_content calls with pre-declared token usage fields.
- model_
call_ span - Create a span for model API calls
- record_
llm_ usage - Record LLM token usage on the current span.
- shutdown_
telemetry - Shutdown telemetry and flush any pending spans.
- tool_
execute_ span - Create a span for tool execution
Attribute Macros§
- instrument
- Instruments a function to create and enter a
tracingspan every time the function is called.