How to use the aiozipkin.helpers.make_timestamp 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 / tests / test_helpers.py View on Github external
def test_make_timestamp():
    ts = make_timestamp()
    assert len(str(ts)) == 16

    ts = make_timestamp(time.time())
    assert len(str(ts)) == 16
github aio-libs / aiozipkin / tests / test_helpers.py View on Github external
def test_make_timestamp():
    ts = make_timestamp()
    assert len(str(ts)) == 16

    ts = make_timestamp(time.time())
    assert len(str(ts)) == 16
github aio-libs / aiozipkin / aiozipkin / span.py View on Github external
def finish(self, ts: OptTs = None,
               exception: Optional[Exception] = None) -> 'Span':
        if exception is not None:
            self.tag(ERROR, str(exception))
        ts = make_timestamp(ts)
        self._record.finish(ts)
        self._tracer._send(self._record)
        return self
github aio-libs / aiozipkin / aiozipkin / span.py View on Github external
def annotate(self, value: str, ts: OptTs = None) -> 'Span':
        ts = make_timestamp(ts)
        self._record.annotate(value, ts)
        return self
github aio-libs / aiozipkin / aiozipkin / span.py View on Github external
def start(self, ts: OptTs = None) -> 'Span':
        ts = make_timestamp(ts)
        self._record.start(ts)
        return self