Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def register_required_propagators(self):
from .text_propagator import TextPropagator
from .binary_propagator import BinaryPropagator
self.register_propagator(Format.TEXT_MAP, TextPropagator())
self.register_propagator(Format.HTTP_HEADERS, TextPropagator())
self.register_propagator(Format.BINARY, BinaryPropagator())
def __init__(self, enable_binary_format, recorder, scope_manager):
"""Initialize the LightStep Tracer, deferring to BasicTracer."""
super(_LightstepTracer, self).__init__(recorder, scope_manager=scope_manager)
self.register_propagator(Format.TEXT_MAP, TextPropagator())
self.register_propagator(Format.HTTP_HEADERS, TextPropagator())
if enable_binary_format:
# We do this import lazily because protobuf versioning issues
# can cause process-level failure at import time.
from basictracer.binary_propagator import BinaryPropagator
self.register_propagator(Format.BINARY, BinaryPropagator())
self.register_propagator(LightStepFormat.LIGHTSTEP_BINARY, LightStepBinaryPropagator())