Skip to content

test(tornado): add a NoOpTracerProvider test - #5219

Open
BHAWESHBHASKAR wants to merge 3 commits into
open-telemetry:mainfrom
BHAWESHBHASKAR:tornado-noop-tracer-provider-test
Open

BHAWESHBHASKAR wants to merge 3 commits into
open-telemetry:mainfrom
BHAWESHBHASKAR:tornado-noop-tracer-provider-test

Conversation

@BHAWESHBHASKAR

Copy link
Copy Markdown

Description

Adds test_no_op_tracer_provider to the tornado instrumentation tests. It instruments with trace.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 existing test_not_recording uses 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 while test_not_recording still 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.

  • I am a human and not a bot
  • I have run tox -e precommit
  • I have run tox -e typecheck
  • I have run the relevant tests and linting tox environments
  • This requires the following PR in core:

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
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: BHAWESHBHASKAR / name: BHAWESHBHASKAR (5fce5c5)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-11 12:49 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@github-actions

Copy link
Copy Markdown

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.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Nov 10, 2026
@github-actions github-actions Bot removed the Stale label Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Audit and test opentelemetry-instrumentation-tornado

1 participant