struct OpenTelemetry::SpanContext

Defined in:

span_context.cr
span_context/config.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.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) #

[View source]
def self.new(inherited_context : SpanContext) #

[View source]
def self.new(configuration : Config) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.build(inherited_context : SpanContext | Nil = nil, &) #

[View source]

Instance Method Detail

def [](val) #

[View source]
def []=(val, val2) #

[View source]
def []?(val) #

[View source]
def is_remote #

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


[View source]
def is_valid #

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


[View source]
def parent_id : Slice(UInt8) | Nil #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


[View source]
def parent_id=(parent_id : Slice(UInt8) | Nil) #

[View source]
def remote : Bool #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


[View source]
def remote=(remote : Bool) #

[View source]
def remote? #

[View source]
def span_id : Slice(UInt8) #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


[View source]
def span_id=(span_id : Slice(UInt8)) #

[View source]
def trace_flags : TraceFlags #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


[View source]
def trace_flags=(trace_flags : TraceFlags) #

[View source]
def trace_id : Slice(UInt8) #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


[View source]
def trace_id=(trace_id : Slice(UInt8)) #

[View source]
def 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.


[View source]
def 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.


[View source]
def valid? #

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


[View source]