How to use the opentelemetry-api.src.opentelemetry.context.base_context.wrap_callable function in opentelemetry-api

To help you get started, we’ve selected a few opentelemetry-api 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-api / src / opentelemetry / context / thread_local_context.py View on Github external
def __init__(self, name: str, default: "object"):
            # pylint: disable=super-init-not-called
            self.name = name
            self.default = base_context.wrap_callable(
                default
            )  # type: typing.Callable[..., object]
github open-telemetry / opentelemetry-python / opentelemetry-api / src / opentelemetry / context / async_context.py View on Github external
def __init__(self, name: str, default: object):
                # pylint: disable=super-init-not-called
                self.name = name
                self.contextvar = ContextVar(name)  # type: ContextVar[object]
                self.default = base_context.wrap_callable(
                    default
                )  # type: typing.Callable[..., object]

opentelemetry-api

OpenTelemetry Python API

Apache-2.0
Latest version published 4 days ago

Package Health Score

97 / 100
Full package analysis