Skip to main content

Module observability

Module observability 

Source
Expand description

Observability stack for the Synwire framework.

This module provides tracing, metrics, and event-bus abstractions for monitoring AI agent execution. All observability features are opt-in via Cargo feature flags:

  • event-bus: In-memory publish/subscribe event bus (requires tokio).
  • tracing: OpenTelemetry tracing bridge and metrics collector (requires tracing, tracing-opentelemetry, opentelemetry, opentelemetry_sdk).

Core types such as ObservabilitySpanKind, TraceContentFilter, and the OTel attribute/metric constants are always available.

Modules§

gen_ai
OTel GenAI attribute key constants.
gen_ai_metrics
OTel GenAI metric name constants.

Structs§

BatchConfig
Configuration for batch processing of observability events.
GenAIAttributeMapper
Default attribute mapper that translates GenAI semantic convention keys.
OTelMetricsCollector
OpenTelemetry-based metrics collector using histogram instruments.
OTelTracingBridge
OpenTelemetry-based tracing bridge.
SpanGuard
RAII guard that ends a span when dropped.
TraceContentFilter
Controls which content is included in observability traces.
TracingConfig
Top-level tracing configuration.

Enums§

ObservabilitySpanKind
The kind of observability span, corresponding to AI framework operations.
SpanOutcome
Outcome of a traced span.

Traits§

MetricsCollector
Trait for collecting observability metrics.
OTelAttributeMapper
Trait for mapping domain-specific attributes to OpenTelemetry key-value pairs.
TracingBridge
Trait for bridging observability events to a tracing backend.