Missing labels in Prometheus metrics
cbermudez97 opened this issue · comments
Description
Currently some of the exported Prometheus metrics are not having the same set of labels as others. See examples.
Metric with labels:
# HELP nethermind_sync_peers Number of sync peers.
# TYPE nethermind_sync_peers gauge
nethermind_sync_peers{client_type="Nethermind",Instance="chiado-lighthouse-0",Network="Chiado",SyncType="Snap",PruningMode="Hybrid",Version="1.27.0-unstable+218dfcde",Commit="218dfcdee0405ef60024d8fd6cb8b4460534f978",Runtime=".NET 8.0.6",BuildTimestamp="1717773379"} 38
nethermind_sync_peers{client_type="Erigon",Instance="chiado-lighthouse-0",Network="Chiado",SyncType="Snap",PruningMode="Hybrid",Version="1.27.0-unstable+218dfcde",Commit="218dfcdee0405ef60024d8fd6cb8b4460534f978",Runtime=".NET 8.0.6",BuildTimestamp="1717773379"} 10
nethermind_sync_peers{client_type="Unknown",Instance="chiado-lighthouse-0",Network="Chiado",SyncType="Snap",PruningMode="Hybrid",Version="1.27.0-unstable+218dfcde",Commit="218dfcdee0405ef60024d8fd6cb8b4460534f978",Runtime=".NET 8.0.6",BuildTimestamp="1717773379"} 0
Metric without labels:
# HELP dotnet_collection_count_total GC collection count
# TYPE dotnet_collection_count_total counter
dotnet_collection_count_total{generation="0"} 107247
dotnet_collection_count_total{generation="1"} 102779
dotnet_collection_count_total{generation="2"} 53334
Steps to Reproduce
In order to replicate the behavior, please provide a detailed list of steps:
- Setup Nethermind client with Metrics enabled and configure the Metrics endpoint host and port.
- Query the Prometheus metrics endpoint.
Actual behavior
Only nethermind_*
metrics have the labels while the microsoft_*
, system_*
, process_*
, dotnet_*
, and prometheus_*
metrics don't have them.
Expected behavior
All metrics have the labels.
Screenshots
None
Desktop (please complete the following information):
Please provide the following information regarding your setup:
- Operating System: Ubuntu 22.04
- Version: 1.26.0
- Installation Method: Docker
- Consensus Client: Lighthouse latest
Additional context
The metrics add an instance
label when pushed to a Prometheus Pushgateway which can be used in those case but are not included in the Prometheus endpoint response.
Logs
None