Closed hjpotter92 closed 2 months ago
We're flooding the logs with these warnings/errors. It's mostly X-Region-Name
missing... maybe we could live without Region
and stop spamming the logs
We're flooding the logs with these warnings/errors. It's mostly
X-Region-Name
missing... maybe we could live withoutRegion
and stop spamming the logs
yeah, probably might be better if we only log for cases when multiple headers are missing (for eg.):
W0731 09:48:49.223187 2835021 analytics.go:117] cannot parse geo info from analytics log request header, err=%vmissing geo headers: [X-City-Country-Name X-City-Country-Code X-Region-Name]
We're flooding the logs with these warnings/errors. It's mostly
X-Region-Name
missing... maybe we could live withoutRegion
and stop spamming the logsyeah, probably might be better if we only log for cases when multiple headers are missing (for eg.):
W0731 09:48:49.223187 2835021 analytics.go:117] cannot parse geo info from analytics log request header, err=%vmissing geo headers: [X-City-Country-Name X-City-Country-Code X-Region-Name]
There are no cases of missing headers other than X-Region-Name
so either excluding just this header from the warning or reporting only if more than one is missing like you suggested should be good.
@ecmulli is this header missing expected or something we need to investigate? If it's expected then agree we should stop spamming the logs about it
I think that geoip does not always provide this field
@ecmulli is this header missing expected or something we need to investigate? If it's expected then agree we should stop spamming the logs about it
It is not expected but I like @pwilczynskiclearcode 's suggestion of only logging when multiple are missing.
@ecmulli is this header missing expected or something we need to investigate? If it's expected then agree we should stop spamming the logs about it
It is not expected but I like @pwilczynskiclearcode 's suggestion of only logging when multiple are missing.
I think we should not log when X-Region-Name
is missing (as suggested by Paweł). We expect this field sometimes not being present. @hjpotter92 I think you can merge your PR and I'll fire a new one with this logic.
i was getting tired of seeing
%v
appear in logs: