Skip to content

MetricsPort: tor_relay_connections incorrect type / mixture of types in single metric

Hello @dgoulet, thanks for your recent work on #40194 (closed) / !625 (merged), it was already useful!

tor_relay_connections currently contains a mixture of different types (counter, gauge) but is defined as counter:

TYPE tor_relay_connections counter

grafana makes use of the type information - which is incorrect in this case, it is probably best to split it up.

The prometheus project lists a few common best practices on this page: https://prometheus.io/docs/practices/naming/

"As a rule of thumb, either the sum() or the avg() over all dimensions of a given metric should be meaningful (though not necessarily useful). If it is not meaningful, split the data up into multiple metrics."

metric type definitions: https://prometheus.io/docs/concepts/metric_types/

Are all combination of currently used labels actually possible? for example: type="Exit",direction="received",state="opened" if they are not, it is probably best to remove them to save space.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information