Skip to content

Commit 36dd87c

Browse files
committed
Add remaining fixes
Fixes open-telemetry#242
1 parent 7994102 commit 36dd87c

File tree

2 files changed

+1
-5
lines changed
  • instrumentation/opentelemetry-instrumentation-opentracing-shim

2 files changed

+1
-5
lines changed

instrumentation/opentelemetry-instrumentation-opentracing-shim/src/opentelemetry/instrumentation/opentracing_shim/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class ScopeShim(opentracing.Scope):
327327
def __init__(self, manager, span, span_cm=None):
328328
super().__init__(manager, span)
329329
self._span_cm = span_cm
330-
self._token = attach(set_value("scope_shim", self))
330+
attach(set_value("scope_shim", self))
331331

332332
# TODO: Change type of `manager` argument to `opentracing.ScopeManager`? We
333333
# need to get rid of `manager.tracer` for this.
@@ -395,8 +395,6 @@ def close(self):
395395
else:
396396
self._span.unwrap().end()
397397

398-
detach(self._token)
399-
400398

401399
class ScopeManagerShim(opentracing.ScopeManager):
402400
"""Implements :class:`opentracing.ScopeManager` by setting and getting the

instrumentation/opentelemetry-instrumentation-opentracing-shim/tests/test_shim.py

-2
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,6 @@ def test_extract_empty_context_returns_invalid_context(self):
532532
try:
533533
carrier = {}
534534

535-
from ipdb import set_trace
536-
set_trace()
537535
ctx = self.shim.extract(opentracing.Format.HTTP_HEADERS, carrier)
538536
self.assertEqual(ctx.unwrap(), trace.INVALID_SPAN_CONTEXT)
539537
finally:

0 commit comments

Comments
 (0)