Skip to content

Commit ca8eac6

Browse files
authored
Account for ProxyTracerProvider (#399)
1 parent e96a2cd commit ca8eac6

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: 1a12fa0d681e37c1fda9cb8d46212ff3bbf6b76a
9+
CORE_REPO_SHA: 94bf80f3870bceefa72d9a61353eaf5d7dd30993
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)