How to use the basictracer.text_propagator.TextPropagator function in basictracer

To help you get started, we’ve selected a few basictracer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opentracing / basictracer-python / basictracer / tracer.py View on Github external
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())
github lightstep / lightstep-tracer-python / lightstep / tracer.py View on Github external
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())