Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcmgr: add libp2p prefix to all metrics #2063

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rate(rcmgr_blocked_resources[$__rate_interval])",
"expr": "rate(libp2p_rcmgr_blocked_resources[$__rate_interval])",
"interval": "",
"legendFormat": "",
"refId": "A"
Expand Down Expand Up @@ -273,7 +273,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_streams{scope=\"system\"}",
"expr": "libp2p_rcmgr_streams{scope=\"system\"}",
"interval": "",
"legendFormat": "{{dir}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -365,7 +365,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_streams{scope=\"transient\"}",
"expr": "libp2p_rcmgr_streams{scope=\"transient\"}",
"interval": "",
"legendFormat": "{{dir}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -458,7 +458,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_streams{scope=\"protocol\"}",
"expr": "libp2p_rcmgr_streams{scope=\"protocol\"}",
"interval": "",
"legendFormat": "{{dir}} {{protocol}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -551,7 +551,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(0.50, (rcmgr_peer_streams_bucket - rcmgr_previous_peer_streams_bucket)) - 0.1",
"expr": "histogram_quantile(0.50, (libp2p_rcmgr_peer_streams_bucket - libp2p_rcmgr_previous_peer_streams_bucket)) - 0.1",
"interval": "",
"legendFormat": "p50 {{dir}} streams per peer – {{instance}}",
"refId": "A"
Expand All @@ -562,7 +562,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(0.90, (rcmgr_peer_streams_bucket - rcmgr_previous_peer_streams_bucket)) - 0.1",
"expr": "histogram_quantile(0.90, (libp2p_rcmgr_peer_streams_bucket - libp2p_rcmgr_previous_peer_streams_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "p90 {{dir}} streams per peer – {{instance}}",
Expand All @@ -574,7 +574,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(1, (rcmgr_peer_streams_bucket - rcmgr_previous_peer_streams_bucket)) - 0.1",
"expr": "histogram_quantile(1, (libp2p_rcmgr_peer_streams_bucket - libp2p_rcmgr_previous_peer_streams_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "max {{dir}} streams per peer – {{instance}}",
Expand Down Expand Up @@ -641,7 +641,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_streams_bucket{dir=\"inbound\"}-rcmgr_previous_peer_streams_bucket{dir=\"inbound\"})",
"expr": "sum without (instance) (libp2p_rcmgr_peer_streams_bucket{dir=\"inbound\"}-libp2p_rcmgr_previous_peer_streams_bucket{dir=\"inbound\"})",
"format": "heatmap",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -709,7 +709,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_streams_bucket{dir=\"outbound\"}-rcmgr_previous_peer_streams_bucket{dir=\"outbound\"})",
"expr": "sum without (instance) (libp2p_rcmgr_peer_streams_bucket{dir=\"outbound\"}-libp2p_rcmgr_previous_peer_streams_bucket{dir=\"outbound\"})",
"format": "heatmap",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -841,7 +841,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_connections{scope=\"system\"}",
"expr": "libp2p_rcmgr_connections{scope=\"system\"}",
"interval": "",
"legendFormat": "{{dir}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -933,7 +933,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_connections{scope=\"transient\"}",
"expr": "libp2p_rcmgr_connections{scope=\"transient\"}",
"interval": "",
"legendFormat": "{{dir}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -1051,7 +1051,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(0.50, (rcmgr_peer_connections_bucket - rcmgr_previous_peer_connections_bucket)) - 0.1",
"expr": "histogram_quantile(0.50, (libp2p_rcmgr_peer_connections_bucket - libp2p_rcmgr_previous_peer_connections_bucket)) - 0.1",
"interval": "",
"legendFormat": "p50 {{dir}} connections per peer – {{instance}}",
"refId": "A"
Expand All @@ -1062,7 +1062,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(0.90, (rcmgr_peer_connections_bucket - rcmgr_previous_peer_connections_bucket)) - 0.1",
"expr": "histogram_quantile(0.90, (libp2p_rcmgr_peer_connections_bucket - libp2p_rcmgr_previous_peer_connections_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "p90 {{dir}} connections per peer – {{instance}}",
Expand All @@ -1074,7 +1074,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(1, (rcmgr_peer_connections_bucket - rcmgr_previous_peer_connections_bucket)) - 0.1",
"expr": "histogram_quantile(1, (libp2p_rcmgr_peer_connections_bucket - libp2p_rcmgr_previous_peer_connections_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "max {{dir}} connections per peer – {{instance}}",
Expand Down Expand Up @@ -1141,7 +1141,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_connections_bucket{dir=\"inbound\"}-rcmgr_previous_peer_connections_bucket{dir=\"inbound\"})",
"expr": "sum without (instance) (libp2p_rcmgr_peer_connections_bucket{dir=\"inbound\"}-libp2p_rcmgr_previous_peer_connections_bucket{dir=\"inbound\"})",
"format": "heatmap",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -1209,7 +1209,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_connections_bucket{dir=\"outbound\"}-rcmgr_previous_peer_connections_bucket{dir=\"outbound\"})",
"expr": "sum without (instance) (libp2p_rcmgr_peer_connections_bucket{dir=\"outbound\"}-libp2p_rcmgr_previous_peer_connections_bucket{dir=\"outbound\"})",
"format": "heatmap",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -1318,7 +1318,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_memory{scope=\"system\"}",
"expr": "libp2p_rcmgr_memory{scope=\"system\"}",
"interval": "",
"legendFormat": "Bytes Reserved",
"refId": "A"
Expand Down Expand Up @@ -1412,7 +1412,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_memory{scope=\"protocol\"}",
"expr": "libp2p_rcmgr_memory{scope=\"protocol\"}",
"interval": "",
"legendFormat": "{{protocol}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -1506,7 +1506,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_memory{scope=\"service\"}",
"expr": "libp2p_rcmgr_memory{scope=\"service\"}",
"interval": "",
"legendFormat": "{{service}} {{instance}}",
"refId": "A"
Expand Down Expand Up @@ -1620,7 +1620,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(0.50, sum by (le) (rcmgr_peer_memory_bucket - rcmgr_previous_peer_memory_bucket)) - 0.1",
"expr": "histogram_quantile(0.50, sum by (le) (libp2p_rcmgr_peer_memory_bucket - libp2p_rcmgr_previous_peer_memory_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "p50 memory usage per peer",
Expand All @@ -1632,7 +1632,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(0.90, sum by (le) (rcmgr_peer_memory_bucket - rcmgr_previous_peer_memory_bucket)) - 0.1",
"expr": "histogram_quantile(0.90, sum by (le) (libp2p_rcmgr_peer_memory_bucket - libp2p_rcmgr_previous_peer_memory_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "p90 memory usage per peer",
Expand All @@ -1644,7 +1644,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "histogram_quantile(1, sum by (le) (rcmgr_peer_memory_bucket - rcmgr_previous_peer_memory_bucket)) - 0.1",
"expr": "histogram_quantile(1, sum by (le) (libp2p_rcmgr_peer_memory_bucket - libp2p_rcmgr_previous_peer_memory_bucket)) - 0.1",
"hide": false,
"interval": "",
"legendFormat": "max memory usage per peer",
Expand All @@ -1657,7 +1657,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rcmgr_peer_memory_count-rcmgr_previous_peer_memory_count)",
"expr": "sum(libp2p_rcmgr_peer_memory_count-libp2p_rcmgr_previous_peer_memory_count)",
"hide": false,
"instant": false,
"interval": "",
Expand Down Expand Up @@ -1766,7 +1766,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "rcmgr_fds",
"expr": "libp2p_rcmgr_fds",
"interval": "",
"legendFormat": "{{scope}} {{instance}}",
"refId": "A"
Expand All @@ -1777,7 +1777,7 @@
}
],
"refresh": false,
"schemaVersion": 37,
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
Expand All @@ -1793,4 +1793,4 @@
"uid": "MgmGIjjnj",
"version": 1,
"weekStart": ""
}
}
2 changes: 1 addition & 1 deletion p2p/host/resource-manager/obs/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

var (
metricNamespace = "rcmgr"
metricNamespace = "libp2p_rcmgr"

// Conns
conns = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Expand Down