struct

OpenTelemetry::API::SpanContext

Inherits OpenTelemetry::API::AbstractSpanContext / Struct / Value / Object

Constructors

new(trace_id : Slice(UInt8), span_id : Slice(UInt8), parent_id : Slice(UInt8) | Nil, trace_flags : OpenTelemetry::API::TraceFlags, trace_state : Hash(String, String), remote : Bool = false)
Source
new(inherited_context : SpanContext)
Source
new(configuration : Config)
Source

Class methods

build(inherited_context : SpanContext | Nil = nil, &)
Source

Instance methods

[](val)
Source
[]=(val, val2)
Source
[]?(val)
Source
is_remote

The spec dictates that this name be available: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#isvalid

Source
is_valid

The spec dictates that this name be available: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#isvalid

Source
parent_id

This is probably going to be a property

Source
parent_id=(parent_id : Slice(UInt8) | Nil)
Source
remote

ameba:disable Style/QueryBoolMethods

Source
remote=(remote : Bool)

ameba:disable Style/QueryBoolMethods

Source
remote?
Source
span_id

This is probably going to be a property

Source
span_id=(span_id : Slice(UInt8))
Source
trace_flags

This is probably going to be a property

Source
trace_flags=(trace_flags : TraceFlags)
Source
trace_id

This is probably going to be a property

Source
trace_id=(trace_id : Slice(UInt8))
Source
trace_state

TODO: We're currenty playing fast and loose with TraceState. TraceState, per the spec, should be immutable, however, so this will need to be revised.

Source
trace_state=(trace_state : Hash(String, String))

TODO: We're currenty playing fast and loose with TraceState. TraceState, per the spec, should be immutable, however, so this will need to be revised.

Source
valid?

Returns true is the trace id and span id are non-zero

Source

Nested types