How to use the aiozipkin.span.NoopSpan function in aiozipkin

To help you get started, we’ve selected a few aiozipkin 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 aio-libs / aiozipkin / aiozipkin / span.py View on Github external
def new_child(self,
                  name: OptStr = None,
                  kind: OptStr = None) -> 'NoopSpan':
        context = self._tracer._next_context(self.context)
        return NoopSpan(self.tracer, context)
github aio-libs / aiozipkin / aiozipkin / tracer.py View on Github external
def to_span(self, context: TraceContext) -> SpanAbc:
        if not context.sampled:
            return NoopSpan(self, context)

        record = Record(context, self._local_endpoint)
        self._records[context] = record
        return Span(self, context, record)
github aio-libs / aiozipkin / aiozipkin / tracer.py View on Github external
def new_child(self, context: TraceContext) -> SpanAbc:
        new_context = self._next_context(context)
        if not context.sampled:
            return NoopSpan(self, new_context)
        return self.to_span(new_context)