abstract class
OpenTelemetry::Trace::Tracer
- OpenTelemetry::Trace::Tracer
- Reference
- Object
Overview
Starts spans for an instrumentation scope. Concurrency: safe for concurrent use. Implementers must preserve this guarantee.
Direct Known Subclasses
Defined in:
api/trace/tracer.crInstance Method Summary
-
#do_start_span(name : String, parent : Context, kind : SpanKind, attributes : Attributes, links : Array(Link), start_time : Time | Nil) : Span
SPI: implementers override.
-
#enabled? : Bool
Indicates whether creating spans can result in recording.
-
#in_span(name : String, *, context : Context | Nil = nil, kind : SpanKind = SpanKind::Internal, attributes = nil, links : Enumerable(Link) | Nil = nil, start_time : Time | Nil = nil, record_exception : Bool = true, & : Span -> U) : U forall U
Starts a span, activates it for the block, and ends it when the block exits.
-
#start_span(name : String, *, context : Context | Nil = nil, kind : SpanKind = SpanKind::Internal, attributes = nil, links : Enumerable(Link) | Nil = nil, start_time : Time | Nil = nil) : Span
Starts a span.
Instance Method Detail
SPI: implementers override. Applications call #start_span or #in_span.
Indicates whether creating spans can result in recording. Call this before each span creation to skip expensive work when tracing is disabled. The result can change between calls.
Starts a span, activates it for the block, and ends it when the block exits.
Prefer passing attributes known at creation in attributes: because samplers
can only consider attributes supplied at span creation. Pass links available
at creation as links: to make them visible to head samplers.
Exceptions from the block propagate to the caller.
Starts a span. Prefer passing attributes known at creation in attributes:
because samplers can only consider attributes supplied at span creation.
Pass links available at creation as links: to make them visible to head samplers.