mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-02 19:47:17 +08:00
Sync with Remove time_ns from API (#342)
This commit is contained in:
@ -21,7 +21,7 @@ from opentelemetry.context import Context, attach, detach, set_value
|
||||
from opentelemetry.sdk.trace import Span, SpanProcessor
|
||||
from opentelemetry.sdk.trace.export import SpanExporter
|
||||
from opentelemetry.trace import INVALID_TRACE_ID
|
||||
from opentelemetry.util.time import time_ns
|
||||
from opentelemetry.util._time import _time_ns
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -127,9 +127,9 @@ class DatadogExportSpanProcessor(SpanProcessor):
|
||||
break
|
||||
|
||||
# substract the duration of this export call to the next timeout
|
||||
start = time_ns()
|
||||
start = _time_ns()
|
||||
self.export()
|
||||
end = time_ns()
|
||||
end = _time_ns()
|
||||
duration = (end - start) / 1e9
|
||||
timeout = self.schedule_delay_millis / 1e3 - duration
|
||||
|
||||
|
Reference in New Issue
Block a user