buildkite / buildkite-agent-metrics

A command-line tool (and Lambda) for collecting Buildkite agent metrics
MIT License
67 stars 50 forks source link

fix to remove reset in prometheus backend #296

Closed wolfeidau closed 1 month ago

wolfeidau commented 1 month ago

This has been reoved as it can't work for more than one cluster as gauges are scoped to all clusters, but the collect function is called once for each agent token. In summary this leads to gauges only being correct for the last agent, depending what metrics were returned when the cluster was polled as the result doesn't always include all keys. 😭

Also trimmed the pipeline metrics as they aren't used, and ensured the logger included short file name as it is helpful.

Added some comments to ensure my assumptions are captured and avoid confusion in the future.