Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
promdump: improve logging to make collection failures more obvious
Added a dumpSuccessful boolean to the promExport struct to track whether the dump of the metric succeeded or failed. Dump failure for a custom metric is always fatal; we may wish to change this behaviour but that's a topic for another commit. This boolean is set to false before we attempt to collect the metric, then set to true once we have successfully dumped all the batches. Once we have finished processing all the metrics, we count up the number of skipped, successful, and failed dumps and write a summary line. If no dumps were successful, this is fatal. If any dumps failed, a warning is reported, once for inclusion in the log and once at the end of the output for user visibility.
- Loading branch information