How to use the opentelemetry-sdk.src.opentelemetry.sdk.trace.__init__.MultiSpanProcessor function in opentelemetry-sdk

To help you get started, we’ve selected a few opentelemetry-sdk 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 open-telemetry / opentelemetry-python / opentelemetry-sdk / src / opentelemetry / sdk / trace / __init__.py View on Github external
def __init__(
        self,
        sampler: sampling.Sampler = trace_api.sampling.ALWAYS_ON,
        shutdown_on_exit: bool = True,
    ):
        # TODO: How should multiple TracerSources behave? Should they get their own contexts?
        # This could be done by adding `str(id(self))` to the slot name.
        self._current_span_slot = Context.register_slot("current_span")
        self._active_span_processor = MultiSpanProcessor()
        self.sampler = sampler
        self._atexit_handler = None
        if shutdown_on_exit:
            self._atexit_handler = atexit.register(self.shutdown)

opentelemetry-sdk

OpenTelemetry Python SDK

Apache-2.0
Latest version published 14 days ago

Package Health Score

97 / 100
Full package analysis