-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: add network tag to metrics #12733
base: master
Are you sure you want to change the base?
Conversation
@rvagg I am trying to setup a Grafana dashboard on my device to test this out. Can you please just let me know if I am going in the right direction with this PR |
Yep, I think this is the right direction. It's unfortunate that you need to add it to all of the views but that looks like the trickiest bit here. You should be able to register the value at startup, like in here: Lines 211 to 216 in 07f2f69
And in here: Lines 58 to 63 in 07f2f69
Currently I have grafana setup for my node and I'm scraping with prometheus, in my prometheus.yml - job_name: lotus-mainnet
scrape_interval: 10s
metrics_path: '/debug/metrics'
static_configs:
- targets: ['localhost:1234']
labels:
network: 'mainnet'
- job_name: lotus-calibnet
scrape_interval: 10s
metrics_path: '/debug/metrics'
static_configs:
- targets: ['localhost:1235']
labels:
network: 'calibnet' you can see my Then in grafana, when I explore metrics I can see the labels showing up that get reported for that metric type. All of mine have Lines 466 to 473 in 07f2f69
|
We could get the network name from |
Closes #12715
Add network tag to metrics