class
OpenTelemetry::Trace::NonRecordingSpan
Overview
Carries a SpanContext without recording any span operations. Concurrency: immutable and safe for concurrent use.
Defined in:
api/trace/non_recording_span.crConstant Summary
-
INVALID =
new(SpanContext::INVALID)
Constructors
Instance Method Summary
-
#do_add_event(name : String, attributes : Attributes, timestamp : Time | Nil) : Nil
SPI: implementers override.
-
#do_add_link(link : Link) : Nil
SPI: implementers override.
-
#do_end(end_time : Time | Nil) : Nil
SPI: implementers override.
-
#do_set_attribute(key : String, value : AnyValue) : Nil
SPI: implementers override.
-
#do_set_status(status : Status) : Nil
SPI: implementers override.
-
#do_update_name(name : String) : Nil
SPI: implementers override.
- #recording? : Bool
-
#span_context : SpanContext
Returns the span's immutable propagation identity.
Instance methods inherited from class OpenTelemetry::Trace::Span
[]=(key : String, value) : Nil
[]=,
add_event(name : String, attributes = nil, *, timestamp : Time | Nil = nil) : selfadd_event(name : String, *, timestamp : Time | Nil = nil, & : Attributes::Builder -> ) : self add_event, add_link(span_context : SpanContext, attributes = nil) : self add_link, do_add_event(name : String, attributes : Attributes, timestamp : Time | Nil) : Nil do_add_event, do_add_link(link : Link) : Nil do_add_link, do_end(end_time : Time | Nil) : Nil do_end, do_set_attribute(key : String, value : AnyValue) : Nil do_set_attribute, do_set_status(status : Status) : Nil do_set_status, do_update_name(name : String) : Nil do_update_name, end(end_time : Time | Nil = nil) : Nil end, error!(description : String | Nil = nil) : self error!, name=(name : String) : String name=, ok! : self ok!, record_exception(exception : Exception, attributes = nil, *, timestamp : Time | Nil = nil) : self record_exception, recording? : Bool recording?, set_attribute(key : String, value) : self set_attribute, set_attributes(attributes) : self set_attributes, set_status(code : Status::Code, description : String | Nil = nil) : self set_status, span_context : SpanContext span_context, status=(status : Status) : Status status=, update_name(name : String) : self update_name
Constructor Detail
Instance Method Detail
SPI: implementers override. Applications call add_event.
SPI: implementers override. Applications call add_link.
SPI: implementers override. Applications call end. Ignore repeated calls.
SPI: implementers override. Applications call set_attribute or set_attributes.
SPI: implementers override. Applications call set_status. Ignore changes after OK.
SPI: implementers override. Applications call update_name.
Returns the span's immutable propagation identity.