Skip to content

Commit 98a16a0

Browse files
committed
Store ScopeShim in context
This uses the OpenTelemetry context management mechanism to store a ScopeShim object in order to make active return the same object as the one returned by start_active_span. WIP: there is one failing test case, apparently the context does not get cleared before running every test case. This seems related to the order in which test cases are being run.
1 parent 812e4bc commit 98a16a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

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

535+
from ipdb import set_trace
536+
set_trace()
535537
ctx = self.shim.extract(opentracing.Format.HTTP_HEADERS, carrier)
536538
self.assertEqual(ctx.unwrap(), trace.INVALID_SPAN_CONTEXT)
537539
finally:

0 commit comments

Comments
 (0)