Class: LightStep::Propagation::LightStepPropagator
- Inherits:
-
Object
- Object
- LightStep::Propagation::LightStepPropagator
- Defined in:
- lib/lightstep/propagation/lightstep_propagator.rb
Direct Known Subclasses
Constant Summary collapse
- CARRIER_TRACER_STATE_PREFIX =
'ot-tracer-'
- CARRIER_SPAN_ID =
'ot-tracer-spanid'
- CARRIER_TRACE_ID =
'ot-tracer-traceid'
- CARRIER_SAMPLED =
'ot-tracer-sampled'
- CARRIER_BAGGAGE_PREFIX =
'ot-baggage-'
Instance Method Summary collapse
-
#extract(format, carrier) ⇒ SpanContext
Extract a SpanContext from a carrier.
-
#inject(span_context, format, carrier) ⇒ Object
Inject a SpanContext into the given carrier.
Instance Method Details
#extract(format, carrier) ⇒ SpanContext
Extract a SpanContext from a carrier
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/lightstep/propagation/lightstep_propagator.rb', line 34 def extract(format, carrier) case format when OpenTracing::FORMAT_TEXT_MAP extract_from_text_map(carrier) when OpenTracing::FORMAT_BINARY warn 'Binary join format not yet implemented' nil when OpenTracing::FORMAT_RACK extract_from_rack(carrier) else warn 'Unknown join format' nil end end |
#inject(span_context, format, carrier) ⇒ Object
Inject a SpanContext into the given carrier
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lightstep/propagation/lightstep_propagator.rb', line 17 def inject(span_context, format, carrier) case format when OpenTracing::FORMAT_TEXT_MAP inject_to_text_map(span_context, carrier) when OpenTracing::FORMAT_BINARY warn 'Binary inject format not yet implemented' when OpenTracing::FORMAT_RACK inject_to_rack(span_context, carrier) else warn 'Unknown inject format' end end |