Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was apparently a Grafana outage that caused the guardian to hang while posting to Loki because the channel filled up, blocking the caller. This PR adds checking for channel full and metrics to be incremented if the channel post succeeds or fails.
To test this PR I configured an nginx proxy for grafana logging as documented here and pointed my local guardian at it.
I then added testing code that creates a go routine to generate ten log messages per second. After verifying those showed up in Grafana, I stopped the ngxinx proxy.
Before this fix, logging (even to the terminal) stopped. After this fix, the logging to the terminal continued. (Obviously there is a gap in Grafana.
I also verified that logging to Grafana resumed a few minutes after restarting the proxy service, without needing to restart the guardian.