Repository navigation
test(tornado): add a NoOpTracerProvider test - #5219
Open
BHAWESHBHASKAR wants to merge 3 commits into
Open
BHAWESHBHASKAR wants to merge 3 commits into
BHAWESHBHASKAR wants to merge 3 commits into
Conversation
Instrument with trace.NoOpTracerProvider() and check that a request still succeeds and that no spans are exported, as the flask, requests and urllib3 instrumentation tests already do. The existing test_not_recording uses a mock tracer, so it would not catch the instrumentation relying on SDK-only span attributes. Part of open-telemetry#958 Fixes open-telemetry#962
|
|
Pull request dashboard statusWaiting on reviewers · refreshed 2026-11-11 12:49 UTC Review the latest changes. Status above doesn't look right?
|
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
test_no_op_tracer_providerto the tornado instrumentation tests. It instruments withtrace.NoOpTracerProvider(), requests/parametrized/hello/, and checks that the response is still a 200 with the expected body and that no spans are exported, as the flask, requests and urllib3 instrumentation tests already do. The existingtest_not_recordinguses a mock tracer, so it would not catch the instrumentation relying on SDK-only span attributes.Fixes #962
Part of #958
Type of change
Test only, no change to the instrumentation code.
How this was tested
Ran the tornado tests with pytest on Python 3.12, plus ruff check, ruff format and pylint with the repo config. To make sure the test is useful, I temporarily made the instrumentation read
span.start_time(only present on SDK spans): the new test failed with a 500 whiletest_not_recordingstill passed.There is no changelog fragment since behavior does not change. Could a maintainer add the Skip Changelog label?
Checklist
See contributing.md for styleguide, changelog guidelines, and more.
tox -e precommittox -e typecheck