class Atatus::OpenTracing::SpanContext
@api private
Attributes
trace_context[RW]
Public Class Methods
from_header(header)
click to toggle source
# File lib/atatus/opentracing.rb, line 128 def self.from_header(header) return unless header trace_context = Atatus::TraceContext.parse(header) return unless trace_context trace_context.traceparent.id = trace_context.parent_id trace_context.traceparent.parent_id = nil from_trace_context(trace_context) end
from_trace_context(trace_context)
click to toggle source
# File lib/atatus/opentracing.rb, line 140 def self.from_trace_context(trace_context) new(trace_context: trace_context) end
new(trace_context:, baggage: nil)
click to toggle source
# File lib/atatus/opentracing.rb, line 115 def initialize(trace_context:, baggage: nil) if baggage Atatus.agent.config.logger.warn( 'Baggage is not supported by Atatus' ) end @trace_context = trace_context end
Public Instance Methods
child()
click to toggle source
# File lib/atatus/opentracing.rb, line 144 def child self.class.from_trace_context(trace_context.child) end