rabbitmq / rabbitmq-prometheus

A minimalistic Prometheus exporter of core RabbitMQ metrics
Other
147 stars 110 forks source link

Review metric naming with @brian-brazil #3

Closed gerhard closed 5 years ago

gerhard commented 5 years ago

Started as a Prometheus docs discussion in prometheus/docs#1414, mostly based on https://prometheus.io/docs/instrumenting/writing_exporters/

Raft metrics are of type gauge, not counter. If you care about the absolute value rather than only how fast it's increasing, that's a gauge

All node_persister_metrics are now counters - some were gauges before. They are now named using metric naming best practices: https://prometheus.io/docs/practices/naming/

All metrics names that should have units, do. Some use microseconds, others milliseconds and others bytes or ops (operations). We don't do any unit conversion in the collector but simply expose the units that are used when the metric value is written to ETS.

While some metrics such as io_sync_time_microseconds_total would be better expressed as Sumarries, the refactoring required to achieve that is not worth the effort. Will keep things simple & imperfect for now, especially since we don't have a dashboard that helps visualise these metrics.

The next step is to address global labels - will submit as a separate PR.

[#167846096]

gerhard commented 5 years ago

This is the first set of changes based on the https://github.com/prometheus/docs/pull/1414 discuss.

How does it look @brian-brazil?