add an option to show JSON cache metrics #4464
Merged
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.
Hello there,
this adds a new
json-cache-metrics
parameter to write to anos.File
. Handy in deamonless mode, mode with which it is a bit hard to scrape metrics the good way.At first it was just writting to stderr like the rest, after everything is done. But while seeking the end of log file to just get the last line works, it turned out a bit brittle at scale (in our case).
So I made it possible to pick a file just like for
trace
. (But also kept the std(out/err) option, nice locally)LMK what you think.
Closes #4445