How to use the opentelemetry-api.src.opentelemetry.trace.status.StatusCanonicalCode.OK 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 / trace / status.py View on Github external
def is_ok(self) -> bool:
        """Returns false if this represents an error, true otherwise."""
        return self._canonical_code is StatusCanonicalCode.OK
github open-telemetry / opentelemetry-python / opentelemetry-api / src / opentelemetry / trace / status.py View on Github external
def __init__(
        self,
        canonical_code: StatusCanonicalCode = StatusCanonicalCode.OK,
        description: typing.Optional[str] = None,
    ):
        self._canonical_code = canonical_code
        self._description = description

opentelemetry-api

OpenTelemetry Python API

Apache-2.0
Latest version published 3 days ago

Package Health Score

97 / 100
Full package analysis