Skip to content
Navigation

OpenTelemetry-based observability for Orbiter agents and tools.

Installation

bash
pip install "orbiter-trace @ git+https://github.com/Midsphere-AI/orbiter-ai.git#subdirectory=packages/orbiter-trace"

Module path

python
import orbiter.trace

Package exports

ExportModuleDescription
TraceConfigorbiter.trace.configImmutable configuration for the trace layer
TraceBackendorbiter.trace.configSupported trace export backends enum
tracedorbiter.trace.decoratorDecorator wrapping a function in an OpenTelemetry span
span_syncorbiter.trace.decoratorSynchronous span context manager
Timerorbiter.trace.instrumentationSimple timer for measuring durations
build_agent_attributesorbiter.trace.instrumentationBuild attribute dict for agent metrics
build_tool_attributesorbiter.trace.instrumentationBuild attribute dict for tool metrics
record_agent_runorbiter.trace.instrumentationRecord agent run metrics
record_tool_steporbiter.trace.instrumentationRecord tool step metrics
PromptLoggerorbiter.trace.prompt_loggerStructured LLM execution logger
ExecutionLogEntryorbiter.trace.prompt_loggerStructured record of a single LLM execution
TokenBreakdownorbiter.trace.prompt_loggerPer-role token counts and context window analysis
compute_token_breakdownorbiter.trace.prompt_loggerCompute a TokenBreakdown from message dicts
estimate_tokensorbiter.trace.prompt_loggerEstimate token count from character length
BaggagePropagatororbiter.trace.propagationExtract and inject W3C Baggage headers
Carrierorbiter.trace.propagationProtocol for reading/writing propagation headers
DictCarrierorbiter.trace.propagationCarrier backed by a plain dict
SpanConsumerorbiter.trace.propagationABC for span consumers
get_baggageorbiter.trace.propagationReturn the current baggage as a dict
get_baggage_valueorbiter.trace.propagationReturn a single baggage value
set_baggageorbiter.trace.propagationSet a single baggage key-value pair
clear_baggageorbiter.trace.propagationRemove all baggage entries
register_span_consumerorbiter.trace.propagationRegister a span consumer
get_span_consumerorbiter.trace.propagationLook up a span consumer by name
list_span_consumersorbiter.trace.propagationList all registered span consumer names
dispatch_spansorbiter.trace.propagationSend spans to all registered consumers
clear_span_consumersorbiter.trace.propagationRemove all registered span consumers

Submodules