class LightStep::Propagation::B3Propagator

Constants

CARRIER_SAMPLED
CARRIER_SPAN_ID
CARRIER_TRACER_STATE_PREFIX
CARRIER_TRACE_ID
TRUE_VALUES

Private Instance Methods

sampled_flag_from_carrier(carrier) click to toggle source
# File lib/lightstep/propagation/b3_propagator.rb, line 24
def sampled_flag_from_carrier(carrier)
  TRUE_VALUES.include?(carrier[self.class::CARRIER_SAMPLED])
end
sampled_flag_from_ctx(ctx) click to toggle source
# File lib/lightstep/propagation/b3_propagator.rb, line 20
def sampled_flag_from_ctx(ctx)
  ctx.sampled? ? '1' : '0'
end
trace_id_from_ctx(ctx) click to toggle source

propagate the full 128-bit trace id if the original id was 128-bit, use the 64 bit id otherwise

# File lib/lightstep/propagation/b3_propagator.rb, line 16
def trace_id_from_ctx(ctx)
  ctx.id_truncated? ? ctx.trace_id128 : ctx.trace_id64
end