-
Notifications
You must be signed in to change notification settings - Fork 336
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
use 'moonbeam' prefix when emitting prometheus metrics #1329
Conversation
thank @nbaztec, this is an excellent first contribution :) This is a breaking change for ops, so we'll have to remember to warn them when we release the client v0.22! cc @purestakeoskar @Mitchell-Grimes, so that you already have it in your head. |
There's another existing issue for I'm just not sure if the following is the desired behavior for that issue:
Any thoughts? |
@artkaseman, what do you think? |
This would be how Polkadot now separates its metrics, we do some magic in our backend so we will be able to handle incoming changes for our dashboards not to break. But really looking forward to any new additional metrics, especially Moonbeam specific ones 🙂 |
The original use case for the chain id is actually no longer valid. It would be a nice to have but would this greatly increase cardinality if it's included in every metric? @PSjoe |
I'm afraid I don't follow exactly what's going on here. If we're talking about adding a new label like |
@nbaztec When the Pr is approved and the CI is green you can merge directly, unless there is a code freeze when a release is coming. |
What does it do?
Configures the prometheus registry to use
moonbeam
prefix when emitting metrics. The metrics would continue to use the chain id as a value for the labelchain
.Based on similar polkadot feature here.
What important points reviewers should know?
Existing (grafana) dashboards will break since the metrics are renamed (eg:
moonbeam_substrate_block_height
).Existing metrics do not use a prefix and hence are emitted as is. This change will prepend
moonbeam_
to all metric names that are emitted by the client:substrate_block_height
->moonbeam_substrate_block_height
.All consumers of the metrics (e.g. Grafana) need to use the prefixed metric names going forward.
Is there something left for follow-up PRs?
(Manual) Integration test must be performed to ascertain that the runtime's prometheus registry override does not inadvertently override prefix for metrics emitted outside the runtime.Confirmed locally with prometheus.
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?
Clients can easily distinguish the emitted metrics by the moonbeam application. Distinct chains can be filtered on the
chain
label.