Open
Description
Describe the bug:
For any calls to services, all 4xx status codes are reporting as error. This includes expected 401 / 403 / 404 codes, which just indicate an issue with the requester (not an error in code).
This causes our alerts to be useless since we cannot tell if something is an error (to alert every time to fix) or just an invalid request (to alert for anomalies).
To Reproduce
- Set up monitoring for a project with GCS
- Have code call to GCS bucket to check for existence on a file that doesn't exist (GCS will return 404)
- Pull up dashboard (or alerts)
- See that it is reported as an error
Environment (please complete the following information)
- OS: Linux
- Python version: 3.8
- Framework and version [e.g. Django 2.1]: Django 3.8
- APM Server version: 7.15
- Agent version: 6.14.0
Additional context
-
requirements.txt
:Click to expand
google-cloud-storage==1.42.0
Observations
It seems to be handled differently on different parts of code:
- in traces.py it is looking for 5xx's to error
- in instrumentation it is looking for 4xx's to error
Suggestions
Could we have 4xx's return as invalid request or warning levels instead? We could still be able to monitor and alert for them, but differently than 5xx's
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment