Skip to content

Commit df4dcf8

Browse files
committed
Fix conflict issues
1 parent f5369ed commit df4dcf8

File tree

2 files changed

+4
-5
lines changed
  • instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado

2 files changed

+4
-5
lines changed

instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def client_resposne_hook(span, future):
178178
http_status_to_status_code,
179179
unwrap,
180180
)
181-
from opentelemetry.metrics import Histogram, get_meter
181+
from opentelemetry.metrics import get_meter
182182
from opentelemetry.propagators import textmap
183183
from opentelemetry.semconv.trace import SpanAttributes
184184
from opentelemetry.trace.status import Status, StatusCode
@@ -407,13 +407,12 @@ def _get_full_handler_name(handler):
407407

408408

409409
def _start_span(self, handler) -> _TraceContext:
410-
start_time_ns = _time_ns()
411410
start_time = default_timer()
412411

413412
span, token = _start_internal_or_server_span(
414413
tracer=self.tracer,
415414
span_name=_get_operation_name(handler, handler.request),
416-
start_time=start_time_ns,
415+
start_time=time_ns(),
417416
context_carrier=handler.request.headers,
418417
context_getter=textmap.default_getter,
419418
)
@@ -468,7 +467,7 @@ def _finish_span(self, handler, error=None):
468467
if isinstance(error, tornado.web.HTTPError):
469468
status_code = error.status_code
470469
if not ctx and status_code == 404:
471-
ctx = _start_span(self, handler, _time_ns())
470+
ctx = _start_span(self, handler)
472471
else:
473472
status_code = 500
474473
reason = None

instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def fetch_async(
5151
args,
5252
kwargs,
5353
):
54-
start_time = _time_ns()
54+
start_time = time_ns()
5555

5656
# Return immediately if no args were provided (error)
5757
# or original_request is set (meaning we are in a redirect step).

0 commit comments

Comments
 (0)