Closed
Description
It's not guaranteed that successive calls to time.time
return increasing values.
From https://docs.python.org/3/library/time.html#time.time:
While this function normally returns non-decreasing values, it can return a lower value than a previous call if the system clock has been set back between the two calls.
When this happens, the tracer crashes
22:19:35.163 ERROR benchmark.controller.python_client: File "/usr/local/lib/python3.7/dist-packages/opentracing/scope.py", line 84, in __exit__
22:19:35.164 ERROR benchmark.controller.python_client: self.close()
22:19:35.166 ERROR benchmark.controller.python_client: File "/usr/local/lib/python3.7/dist-packages/opentracing/scope_managers/__init__.py", line 77, in close
22:19:35.167 ERROR benchmark.controller.python_client: self.span.finish()
22:19:35.169 ERROR benchmark.controller.python_client: File "/usr/local/lib/python3.7/dist-packages/basictracer/span.py", line 56, in finish
22:19:35.181 ERROR benchmark.controller.python_client: self._tracer.record(self)
22:19:35.184 ERROR benchmark.controller.python_client: File "/usr/local/lib/python3.7/dist-packages/basictracer/tracer.py", line 131, in record
22:19:35.187 ERROR benchmark.controller.python_client: self.recorder.record_span(span)
22:19:35.192 ERROR benchmark.controller.python_client: File "/usr/local/lib/python3.7/dist-packages/lightstep/recorder.py", line 150, in record_span
22:19:35.195 ERROR benchmark.controller.python_client: span_record = self.converter.create_span_record(span, self.guid)
22:19:35.196 ERROR benchmark.controller.python_client: File "/usr/local/lib/python3.7/dist-packages/lightstep/http_converter.py", line 48, in create_span_record
22:19:35.197 ERROR benchmark.controller.python_client: duration_micros=int(util._time_to_micros(span.duration)))
22:19:35.198 ERROR benchmark.controller.python_client: ValueError: Value out of range: -35253