Expand description
This module primarily concerns being able to orchestrate telemetry across a given pipeline or workflow. This includes tracing, being able to send traces to an OpenTelemetry collector, setting up your agents with the correct tracing style so you can emit the right traces for platforms like Langfuse, and more.
Macros§
- completion_
parent_ span - Declare a completion-parent span conforming to the adoption contract.
Structs§
- Completion
Span Builder - Builder for a canonical GenAI completion span.
- Empty
- Marks a span field as declared but not yet valued.
Enums§
- Completion
Operation - A supported GenAI completion operation and its canonical span name.
Constants§
- COMPLETION_
PARENT_ MARKER_ FIELD - Core-owned marker field for a runtime span that may absorb provider completion fields.
- COMPLETION_
PARENT_ REQUIRED_ FIELDS - Fields a completion-parent span must statically declare (as
tracing::field::Emptyor a value) to be adopted byCompletionSpanBuilder::build, alongsideCOMPLETION_PARENT_MARKER_FIELD.
Traits§
- Provider
Response Ext - Provider response metadata used to populate GenAI telemetry spans.
- Span
Combinator - A trait designed specifically to be used with Spans for the purpose of recording telemetry.
Implemented for
tracing::Spanto record GenAI semantic convention fields.
Functions§
- record_
model_ input - Records serialized model input messages on
gen_ai.input.messageswhen content telemetry is explicitly enabled. - record_
model_ output - Records serialized model output messages on
gen_ai.output.messageswhen content telemetry is explicitly enabled. - system_
instructions_ json - Serializes system instructions using the normalized GenAI telemetry shape.