-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
would this be ready for merging and rolling out? |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
Beep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BEEFY
LGTM
@tomaka this doesn't compile, otherwise we should be good to merge this. |
@tomaka does not compile 😬 |
(cargo fmt 🙈 ) |
bot merge |
Error: It's not possible to meet the minimal approval count of 1 in paritytech/polkadot#3623 |
* Remove Prometheus metrics prefix * Fix line widths * Missed some metrics * Fix CLI * Run rustfmt on modified files * Missing prefixes * Hopefully fix compilation * Rustfmt protocol.rs * Should compile now I guess * Rustfmt Co-authored-by: Bastian Köcher <info@kchr.de>
* match the `substrate_` metrics prefix instead of `polkadot_`, following changes in paritytech#9543
* match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in paritytech#9543 * remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert
* match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in paritytech#9543
* .maintain/monitoring: Update substrate prometheus alert rules * match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in #9543 * remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert * .maintain/monitoring: Update substrate Grafana dashboards * match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in #9543 * .maintain/monitoring: make the NumberOfFileDescriptorsHigh alert only apply for metrics tagged with 'chain'
* .maintain/monitoring: Update substrate prometheus alert rules * match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in paritytech#9543 * remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert * .maintain/monitoring: Update substrate Grafana dashboards * match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in paritytech#9543 * .maintain/monitoring: make the NumberOfFileDescriptorsHigh alert only apply for metrics tagged with 'chain'
* .maintain/monitoring: Update substrate prometheus alert rules * match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in paritytech#9543 * remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert * .maintain/monitoring: Update substrate Grafana dashboards * match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in paritytech#9543 * .maintain/monitoring: make the NumberOfFileDescriptorsHigh alert only apply for metrics tagged with 'chain'
* Remove Prometheus metrics prefix * Fix line widths * Missed some metrics * Fix CLI * Run rustfmt on modified files * Missing prefixes * Hopefully fix compilation * Rustfmt protocol.rs * Should compile now I guess * Rustfmt Co-authored-by: Bastian Köcher <info@kchr.de>
* .maintain/monitoring: Update substrate prometheus alert rules * match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in paritytech#9543 * remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert * .maintain/monitoring: Update substrate Grafana dashboards * match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in paritytech#9543 * .maintain/monitoring: make the NumberOfFileDescriptorsHigh alert only apply for metrics tagged with 'chain'
* Remove Prometheus metrics prefix * Fix line widths * Missed some metrics * Fix CLI * Run rustfmt on modified files * Missing prefixes * Hopefully fix compilation * Rustfmt protocol.rs * Should compile now I guess * Rustfmt Co-authored-by: Bastian Köcher <info@kchr.de>
* .maintain/monitoring: Update substrate prometheus alert rules * match the `substrate_` metrics prefix in alerts instead of `polkadot_`, following changes in paritytech#9543 * remove the filtering on polkadot|kusama domain for NumberOfFileDescriptorsHigh alert * .maintain/monitoring: Update substrate Grafana dashboards * match the `substrate_` metrics prefix instead of `polkadot_` in dashboards, following changes in paritytech#9543 * .maintain/monitoring: make the NumberOfFileDescriptorsHigh alert only apply for metrics tagged with 'chain'
The situation right now is that, at initialization, we call
Registry::new_custom(Some("substrate"), None)
, which automatically adds asubstrate_
prefix in front of every single metric that we register.Polkadot, however, overwrites this
Registry
by doingRegistry::new_custom(Some("polkadot"), None)
, meaning that, in Polkadot, all metrics, even the ones defined in Substrate, have thepolkadot_
prefix.This causes a big issue: Grafana dashboards and alerts need to be created once for Polkadot nodes and once for all-Substrate-chains-except-Polkadot.
This PR modifies this system by removing the automatic metrics prefixing. Instead, I've manually added
substrate_
in front of all the metrics registered in Substrate andpolkadot_
in front of all the metrics registered in Polkadot. This matches the Prometheus good practices, which mention that libraries (Substrate is a library) can have their own prefix different from the binary.However, in order to make things easier for devops, this PR also adds an automatic
{chain="chain_id"}
parameter behind every metric, wherechain_id
is the chain id found in the chain spec (e.g. "polkadot" or "ksmcc3").polkadot companion: paritytech/polkadot#3623