Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_make_timestamp():
ts = make_timestamp()
assert len(str(ts)) == 16
ts = make_timestamp(time.time())
assert len(str(ts)) == 16
def test_make_timestamp():
ts = make_timestamp()
assert len(str(ts)) == 16
ts = make_timestamp(time.time())
assert len(str(ts)) == 16
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
def annotate(self, value: str, ts: OptTs = None) -> 'Span':
ts = make_timestamp(ts)
self._record.annotate(value, ts)
return self
def start(self, ts: OptTs = None) -> 'Span':
ts = make_timestamp(ts)
self._record.start(ts)
return self