Skip to content

[WIP] Fix tornado server (request) duration metric calculation #3489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devmonkey22
Copy link

Description

Fix the tornado instrumenter to track a request's elapsed time in an async-safe way so concurrent requests calculate their own elapsed time for the HTTP_SERVER_DURATION metric properly.

Fixes #3486

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?

I just used the existing automated tests to ensure no regressions occurred. I can explore further if we want to try to add concurrent request testing.

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 May 9, 2025 16:34
Copy link

linux-foundation-easycla bot commented May 9, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: devmonkey22 / name: Mike D (047bf3d)

@github-actions github-actions bot requested a review from shalevr May 9, 2025 16:34
@devmonkey22 devmonkey22 force-pushed the 3486-tornado-server-duration branch from 91568a1 to 047bf3d Compare May 9, 2025 16:40
@devmonkey22 devmonkey22 marked this pull request as draft May 9, 2025 16:42
@devmonkey22
Copy link
Author

Question for review - with this change, do we think it needs a specific test, where we start 2 concurrent requests, staggered, then measure expected duration similar to opentelemetry-instrumentation-asgi test_asgi_middleware?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tornado instrumentation HTTP_SERVER_DURATION metric is inaccurate and not async-safe
2 participants