jeevesagent.observability.tracing¶
Telemetry adapters.
NoTelemetry— no-op default. Both methods do as little work as possible so wrapping every loop step inasync with telemetry.trace(...)has effectively zero cost when telemetry isn’t configured.OTelTelemetry— OpenTelemetry-backed. Lazy SDK imports inside__init__. Spans go to whateverTracerProvideris configured; metrics go to whateverMeterProvideris configured. Tests pass in-memory providers; production users wire up their exporters once at startup and the adapter inherits.
Metric type dispatch is by suffix:
names ending in
_ms,_seconds, or_bytes-> histogrameverything else -> counter
That keeps the public interface a single emit_metric() while still
producing the right OTel instrument under the hood.
Classes¶
No-op telemetry. Very cheap; safe to call on every loop step. |
|
OpenTelemetry-backed |
Module Contents¶
- class jeevesagent.observability.tracing.NoTelemetry[source]¶
No-op telemetry. Very cheap; safe to call on every loop step.
- async trace(name: str, **attrs: Any) collections.abc.AsyncIterator[jeevesagent.core.types.Span][source]¶
- class jeevesagent.observability.tracing.OTelTelemetry(*, tracer_provider: Any | None = None, meter_provider: Any | None = None, instrumentation_name: str = 'jeevesagent')[source]¶
OpenTelemetry-backed
Telemetry.- async trace(name: str, **attrs: Any) collections.abc.AsyncIterator[jeevesagent.core.types.Span][source]¶