-
Notifications
You must be signed in to change notification settings - Fork 606
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
fix(tornado): ensure reading future.result() won't throw an exception in client.py _finish_tracing_callback #2563
Conversation
|
… in client.py _finish_tracing_callback
This is ready for review now - not planning on making any further changes before it's reviewed. |
Note: Running the lint fix commands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would drop the commit that fixes linting outside the tornado instrumentation and possibly open a new PR with them.
instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py
Outdated
Show resolved
Hide resolved
This reverts commit cbb3e4d.
@xrmx Fixed. Reverted original lint fix commit, re-applied on only tornado dir |
Needs a rebase. Please also allow for maintainer editing so we can rebase for you. |
@lzchen I've merged main in and resolved the changelog conflict, is that equivalent to what you meant by rebasing? It looks like I can't enable maintainer edit as the fork is on a organisation account, not a personal account. lmk how we should proceed. I'm happy to check it twice daily to keep it up-to-date if it's being prepared for merge. |
Co-authored-by: Riccardo Magliocchetti <[email protected]>
Merge conflict resolved, changelog entry moved to Unreleased.Fixed |
Unfortunately you will have to rebase again. I'll try to address this one asap to merge in before any others. |
...on/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py
Show resolved
Hide resolved
@lzchen No worries. Main merged in and changelog confict resolved. |
...on/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Emídio Neto <[email protected]>
Seems like we are good for the reviews. Hopefully one more rebase and we should be good to go! |
@lzchen Nice! Rebased. |
Description
Ensures correct handling of an exception future result from tornado http client. Before this change, an exception result would cause an exception to be raised that is not handled by the lib - which is undesired based on logic in client.py _finish_tracing_callback.
Fixes #2555
Type of change
Please delete options that are not relevant.
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
raise_error=True
and make a request that fails (response of 404, 500, etc...). An exception in _finish_tracing_callback will be raised that is not handled above - bubbles up to the asyncio runtime.Note: The new test class
class TestTornadoHTTPClientInstrumentation
can be copied to main branch, andtest_http_client_failed_response
will fail due to this bug.Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.