Skip to content

Conversation

devmonkey22
Copy link
Contributor

@devmonkey22 devmonkey22 commented Aug 5, 2025

Description

Updated the tornado instrumentation to keep track of if the current handler is executing an excluded URL. If so, it skips tracking metrics both for request/responses.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added TestTornadoMetricsInstrumentation.test_exclude_lists test to verify metrics written don't include server metrics anymore when fetching an excluded URL.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@devmonkey22 devmonkey22 requested a review from a team as a code owner August 5, 2025 21:45
@github-actions github-actions bot requested a review from shalevr August 5, 2025 21:45
@tammy-baylis-swi
Copy link
Contributor

Thanks for this one as well!

It looks like this PR includes the changes from #3679. Could we keep the changes separate?

@devmonkey22
Copy link
Contributor Author

Thanks for this one as well!

It looks like this PR includes the changes from #3679. Could we keep the changes separate?

@tammy-baylis-swi I need the code changes from #3679 in order to have a place to store the exclude_url flag in state (that's async-safe still). Is there a preferred way to include those changes? Or do you just want me to copy the code from init.py without the actual commits, then deal with the merge conflicts (if not auto-mergeable) later, depending on which PR merges first?

@tammy-baylis-swi
Copy link
Contributor

@tammy-baylis-swi I need the code changes from #3679 in order to have a place to store the exclude_url flag in state (that's async-safe still). Is there a preferred way to include those changes? Or do you just want me to copy the code from init.py without the actual commits, then deal with the merge conflicts (if not auto-mergeable) later, depending on which PR merges first?

Ah all right, and it is mentioned in the description.

There's no one preferred way. I'd suggest adjusting the description of #3679 to make it clear that it's introducing a new handler state object. Then maybe #3679 should be the one merged first, and this one after. I'll take a look at the other one for now.

@xrmx
Copy link
Contributor

xrmx commented Aug 22, 2025

@devmonkey22 I've merged the other PR, please fix conflicts in this

@xrmx xrmx moved this to Reviewed PR that needs fixing in @xrmx's Python PR digest Aug 22, 2025
@devmonkey22
Copy link
Contributor Author

@devmonkey22 I've merged the other PR, please fix conflicts in this

Conflicts resolved and ready for another review. Thanks!

Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @devmonkey22 !

@xrmx xrmx moved this from Reviewed PR that needs fixing to Ready for review in @xrmx's Python PR digest Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for review
Development

Successfully merging this pull request may close these issues.

Tornado instrumentation collecting partial/incorrect telemetry when URL excluded
4 participants