You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exceptions that our code does handle (eventually) in the caller of the method that is decorated with @tracer.wrap() are treated as errors by APM. This leads to excessive numbers of APM issue events logged by our monitors and showing up in Datadog APM error tracker. Instead, we desire only uncaught exceptions to be treated as APM errors.
For example, in our Flask web app this code can catch an AuthenticationRequiredError:
try:
process()
httpCode = 200
except BadRequestError:
httpCode = 400
except AuthenticationRequiredError:
httpCode = 401
except UnsupportedMediaType:
httpCode = 415
except Exception: # XXX: Return properly to the caller even under duress
httpCode = 500
but where it is raised is logged as an error:
In addition, for celery tasks that raise a retry, every such raise is treated as an error by @tracer.wrap()
Reproduction Code
No response
Error Logs
No response
Libraries in Use
celery
Operating System
Rocky Linux latest
The text was updated successfully, but these errors were encountered:
gsmethells
changed the title
[BUG]: Handled exceptions get logged as an issue in APM Error Tracker
[BUG]: (Eventually) handled exceptions get logged as an issue in APM Error Tracker
Feb 14, 2025
Tracer Version(s)
2.8.5
Python Version(s)
Python 3.11
Pip Version(s)
pip 25.0.1
Bug Report
Exceptions that our code does handle (eventually) in the caller of the method that is decorated with
@tracer.wrap()
are treated as errors by APM. This leads to excessive numbers of APM issue events logged by our monitors and showing up in Datadog APM error tracker. Instead, we desire only uncaught exceptions to be treated as APM errors.For example, in our Flask web app this code can catch an AuthenticationRequiredError:
but where it is raised is logged as an error:
In addition, for celery tasks that raise a retry, every such raise is treated as an error by
@tracer.wrap()
Reproduction Code
No response
Error Logs
No response
Libraries in Use
celery
Operating System
Rocky Linux latest
The text was updated successfully, but these errors were encountered: