-
Couldn't load subscription status.
- Fork 801
Labels
Description
It would be convenient to provide a way to specify routes and/or status codes are not exceptional.
A common pattern within Pyramid is to raise the desired response for certain business flows (e.g. raise a 301 to force a redirect, raise a 204 after deleting an entity, etc) rather than properly return. Because the response was raised and handled as an HTTPException the span is decorated with exception attributes even though the request was not actually exceptional. This causes many vendors to interpret a false-positive when calculating things like error rate.
There is history of this functionality in other instrumentation:
- https://ddtrace.readthedocs.io/en/stable/advanced_usage.html#custom-error-codes
- https://docs.newrelic.com/docs/apm/agents/python-agent/configuration/python-agent-configuration/#error-ignore
- https://docs.newrelic.com/docs/apm/agents/python-agent/configuration/python-agent-configuration/#error-ignore-status-codes