-
Notifications
You must be signed in to change notification settings - Fork 642
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 errors mapping to 500 #1048
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.10.0-0.29b0...HEAD) | ||
|
||
### Fixed | ||
|
||
- `opentelemetry-instrumentation-tornado` Fix Tornado errors mapping to 500 | ||
([#1048])(https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1048) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
- `opentelemetry-instrumentation-urllib` make span attributes available to sampler | ||
([1014](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1014)) | ||
- `opentelemetry-instrumentation-flask` Fix non-recording span bug | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -420,14 +420,15 @@ def _finish_span(tracer, handler, error=None): | |
status_code = error.status_code | ||
if not ctx and status_code == 404: | ||
ctx = _start_span(tracer, handler, _time_ns()) | ||
if status_code != 404: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @owais There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I undertood right, it was needed for not setting traceback if status equals 404, in other case do it. I've changed this behavior, and now traceback will be setted only for server errors - 500s |
||
else: | ||
status_code = 500 | ||
reason = None | ||
if status_code >= 500: | ||
finish_args = ( | ||
type(error), | ||
error, | ||
getattr(error, "__traceback__", None), | ||
) | ||
status_code = 500 | ||
reason = None | ||
|
||
if not ctx: | ||
return | ||
|
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.
Please move this to
Fixed
section.