To get the geo information of an IP address a query is made to the http://ipinfo.io service.
We log an error for any error response from this service. Including a 503 status-code response.
This means if the http://ipinfo.io service is unavailable, we can get a flood of errors logged.
If we have alarms set to alert us of any logged errors, a lot of noise gets created when the http://ipinfo.io service is unavailable.
Furthermore if the http://ipinfo.io service is unavailable, there isn't much we can do besides to wait for it to be available.
With these changes, a 503 status-code response from the http://ipinfo.io service is logged as an INFO level log rather than an ERROR level log.
Types of changes
What types of changes does your code introduce to this repository?
Put an x in the boxes that apply
[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
[x] Lint and unit tests pass locally with my changes (if applicable)
[x] I have run pre-commit (pre-commit in the repo)
[x] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)
[ ] Linked to the relevant github issue or github discussion
Proposed changes
To get the geo information of an IP address a query is made to the
http://ipinfo.io
service.We log an error for any error response from this service. Including a
503
status-code response. This means if thehttp://ipinfo.io
service is unavailable, we can get a flood of errors logged.If we have alarms set to alert us of any logged errors, a lot of noise gets created when the
http://ipinfo.io
service is unavailable.Furthermore if the
http://ipinfo.io
service is unavailable, there isn't much we can do besides to wait for it to be available.With these changes, a
503
status-code response from thehttp://ipinfo.io
service is logged as anINFO
level log rather than anERROR
level log.Types of changes
What types of changes does your code introduce to this repository? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.pre-commit
in the repo)