Skip to content

Commit

Permalink
Account for ProxyTracerProvider (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
owais committed Apr 7, 2021
1 parent e96a2cd commit ca8eac6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: 1a12fa0d681e37c1fda9cb8d46212ff3bbf6b76a
CORE_REPO_SHA: 94bf80f3870bceefa72d9a61353eaf5d7dd30993

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ def test_suppress_instrumentation(self):
def test_not_recording(self):
with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span:
RequestsInstrumentor().uninstrument()
# original_tracer_provider returns a default tracer provider, which
# in turn will return an INVALID_SPAN, which is always not recording
RequestsInstrumentor().instrument(
tracer_provider=self.original_tracer_provider
tracer_provider=trace._DefaultTracerProvider()
)
mock_span.is_recording.return_value = False
result = self.perform_request(self.URL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ def test_suppress_instrumentation(self):
def test_not_recording(self):
with mock.patch("opentelemetry.trace.INVALID_SPAN") as mock_span:
URLLibInstrumentor().uninstrument()
# original_tracer_provider returns a default tracer provider, which
# in turn will return an INVALID_SPAN, which is always not recording
URLLibInstrumentor().instrument(
tracer_provider=self.original_tracer_provider
tracer_provider=trace._DefaultTracerProvider()
)
mock_span.is_recording.return_value = False
result = self.perform_request(self.URL)
Expand Down

0 comments on commit ca8eac6

Please sign in to comment.