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) #

def self.new(inherited_context : SpanContext) #

def self.new(configuration : Config) #

def self.new #

Class Method Detail

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

Instance Method Detail

def [](val) #

def []=(val, val2) #

def []?(val) #

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 ameba:disable Naming/PredicateName


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 ameba:disable Naming/PredicateName


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

This is probably going to be a property


def parent_id=(parent_id : Slice(UInt8) | Nil) #

def remote : Bool #

ameba:disable Naming/QueryBoolMethods


def remote=(remote : Bool) #

ameba:disable Naming/QueryBoolMethods


def remote? #

def span_id : Slice(UInt8) #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


def span_id=(span_id : Slice(UInt8)) #

def trace_flags : TraceFlags #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


def trace_flags=(trace_flags : TraceFlags) #

def trace_id : Slice(UInt8) #
Description copied from struct OpenTelemetry::API::AbstractSpanContext

This is probably going to be a property


def trace_id=(trace_id : Slice(UInt8)) #

def trace_state : Hash(String, String) #

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


def trace_state=(trace_state : Hash(String, String)) #

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


def valid? #

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