Added Falcon 2.0+ instrumentation#1039
Conversation
1ad6ea6 to
dca4987
Compare
codeboten
left a comment
There was a problem hiding this comment.
This PR looks pretty good, just a couple of things that need to be fixed.
opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
Show resolved
Hide resolved
opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
Show resolved
Hide resolved
|
@open-telemetry/python-approvers would appreciate if someone could help review this. |
47fc481 to
7e84041
Compare
| entry_points={ | ||
| "opentelemetry_instrumentor": [ | ||
| "falcon = opentelemetry.instrumentation.falcon:FalconInstrumentor" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
This can be moved to setup.cfg.
| try: | ||
| return super().__call__(env, _start_response) | ||
| except Exception as exc: | ||
| activation.__exit__( |
There was a problem hiding this comment.
I am assuming that line 132 ends up calling _start_response. What if an exception is raised during the execution of start_response inside _start_response? Would that exception be caught here and activation.__exit__ end up being called twice?
There was a problem hiding this comment.
Good catch. Fixed to call exit after start_response finishes.
| FalconInstrumentor().uninstrument() | ||
|
|
||
| def test_methods(self): | ||
| for method in ["GET", "POST", "PATCH", "PUT", "DELETE", "HEAD"]: |
There was a problem hiding this comment.
Just as a comment, it can be worthy to have this separated in a test_X method for every method, so that if one of these tests fail, it gets reported in the results which method failed.
358d78c to
511c0d6
Compare
511c0d6 to
678f27e
Compare
Remove unwanted support for Python versions <3.6. This integration mistakenly lists Python 3.4 support, because it was merged in open-telemetry/opentelemetry-python#1039, after the merge of open-telemetry/opentelemetry-python#1099, so the latter didn't consider `falcon`. Python 3.4 is broken nevertheless, as this integration already includes f-strings and other `opentelemetry` dependencies, which require Python 3.6. Fixes open-telemetry#772.
Remove unwanted support for Python versions <3.6. This integration mistakenly lists Python 3.4 support, because it was merged in open-telemetry/opentelemetry-python#1039, after the merge of open-telemetry/opentelemetry-python#1099, so the latter didn't consider `falcon`. Python 3.4 is broken nevertheless, as this integration already includes f-strings and other `opentelemetry` dependencies, which require Python 3.6. Fixes open-telemetry#772.
Remove unwanted support for Python versions <3.6. This integration mistakenly lists Python 3.4 support, because it was merged in open-telemetry/opentelemetry-python#1039, after the merge of open-telemetry/opentelemetry-python#1099, so the latter didn't consider `falcon`. Python 3.4 is broken nevertheless, as this integration already includes f-strings and other `opentelemetry` dependencies, which require Python 3.6. Fixes #772.
Add instrumentation for Falcon 2.0+
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
Checklist: