Skip to content

Commit b44af68

Browse files
committed
Account for ProxyTracerProvider
Updated tests that relied on unset tracer being a noop tracer instead of a proxy tracer
1 parent d9d4e2d commit b44af68

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 7054b534404fc69199e368cbe62a4e7570cc46ea
9+
CORE_REPO_SHA: 622d5507708bdb961cf25a48f26a87592b05c356
1010

1111
jobs:
1212
build:

instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@ def test_suppress_instrumentation(self):
177177
def test_not_recording(self):
178178
with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span:
179179
RequestsInstrumentor().uninstrument()
180-
# original_tracer_provider returns a default tracer provider, which
181-
# in turn will return an INVALID_SPAN, which is always not recording
182180
RequestsInstrumentor().instrument(
183-
tracer_provider=self.original_tracer_provider
181+
tracer_provider=trace._DefaultTracerProvider
184182
)
185183
mock_span.is_recording.return_value = False
186184
result = self.perform_request(self.URL)

instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,8 @@ def test_suppress_instrumentation(self):
208208
def test_not_recording(self):
209209
with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span:
210210
URLLibInstrumentor().uninstrument()
211-
# original_tracer_provider returns a default tracer provider, which
212-
# in turn will return an INVALID_SPAN, which is always not recording
213211
URLLibInstrumentor().instrument(
214-
tracer_provider=self.original_tracer_provider
212+
tracer_provider=trace._DefaultTracerProvider
215213
)
216214
mock_span.is_recording.return_value = False
217215
result = self.perform_request(self.URL)

0 commit comments

Comments
 (0)