[][src]Module opentelemetry::api::trace::tracer

OpenTelemetry Tracer interface

The OpenTelemetry library achieves in-process context propagation of Spans by way of the Tracer.

The Tracer is responsible for tracking the currently active Span, and exposes methods for creating and activating new Spans. The Tracer is configured with Propagators which support transferring span context across process boundaries.

Tracers are generally expected to be used as singletons. Implementations SHOULD provide a single global default Tracer.

Some applications may require multiple Tracer instances, e.g. to create Spans on behalf of other applications. Implementations MAY provide a global registry of Tracers for such applications.

The Tracer SHOULD allow end users to configure other tracing components that control how Spans are passed across process boundaries, including the binary and text format Propagators used to serialize Spans created by the Tracer.

Docs: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-tracing.md#tracer

Structs

SpanBuilder

SpanBuilder allows span attributes to be configured before the span has started.

Traits

Tracer

Interface for constructing Spans.

TracerGenerics

TracerGenerics are functions that have generic type parameters. They are a separate trait so that Tracer can be used as a trait object in GlobalTracer.