@@ -5,85 +5,88 @@ use mithril_metric::{build_metrics_service, MetricCounterWithLabels, MetricsServ
55use mithril_metric:: metric:: { MetricCollector , MetricCounter } ;
66use prometheus:: proto:: { LabelPair , MetricFamily } ;
77
8- static ORIGIN_TAG_LABEL : & str = "origin_tag" ;
8+ // Those are three differents dimensions, they use the same value to simplify usage in Grafana
9+ static CLIENT_ORIGIN_TAG_LABEL : & str = "origin_tag" ;
10+ static SIGNER_REGISTRATION_ORIGIN_TAG_LABEL : & str = "origin_tag" ;
11+ static SIGNER_SIGNATURE_ORIGIN_TAG_LABEL : & str = "origin_tag" ;
912
1013build_metrics_service ! (
1114 MetricsService ,
1215
1316 certificate_detail_total_served_since_startup: MetricCounterWithLabels (
1417 "certificate_detail_total_served_since_startup" ,
1518 "Number of certificate details served since startup on a Mithril aggregator node" ,
16- & [ ORIGIN_TAG_LABEL ]
19+ & [ CLIENT_ORIGIN_TAG_LABEL ]
1720 ) ,
1821 artifact_detail_cardano_immutable_files_full_total_served_since_startup: MetricCounterWithLabels (
1922 "mithril_aggregator_artifact_detail_cardano_db_total_served_since_startup" ,
2023 "Number of Cardano immutable files full artifact details served since startup on a Mithril aggregator node" ,
21- & [ ORIGIN_TAG_LABEL ]
24+ & [ CLIENT_ORIGIN_TAG_LABEL ]
2225 ) ,
2326 cardano_immutable_files_full_total_restoration_since_startup: MetricCounterWithLabels (
2427 "mithril_aggregator_cardano_db_total_restoration_since_startup" ,
2528 "Number of Cardano immutable files full restorations since startup on a Mithril aggregator node" ,
26- & [ ORIGIN_TAG_LABEL ]
29+ & [ CLIENT_ORIGIN_TAG_LABEL ]
2730 ) ,
2831 cardano_database_immutable_files_restored_since_startup: MetricCounterWithLabels (
2932 "mithril_aggregator_cardano_db_immutable_files_restored_since_startup" ,
3033 "Number of Cardano immutable files restored since startup on a Mithril aggregator node" ,
31- & [ ORIGIN_TAG_LABEL ]
34+ & [ CLIENT_ORIGIN_TAG_LABEL ]
3235 ) ,
3336 cardano_database_ancillary_files_restored_since_startup: MetricCounterWithLabels (
3437 "mithril_aggregator_cardano_db_ancillary_files_restored_since_startup" ,
3538 "Number of Cardano ancillary files restored since startup on a Mithril aggregator node" ,
36- & [ ORIGIN_TAG_LABEL ]
39+ & [ CLIENT_ORIGIN_TAG_LABEL ]
3740 ) ,
3841 cardano_database_complete_restoration_since_startup: MetricCounterWithLabels (
3942 "mithril_aggregator_cardano_db_complete_restoration_since_startup" ,
4043 "Number of complete Cardano database restoration since startup on a Mithril aggregator node" ,
41- & [ ORIGIN_TAG_LABEL ]
44+ & [ CLIENT_ORIGIN_TAG_LABEL ]
4245 ) ,
4346 cardano_database_partial_restoration_since_startup: MetricCounterWithLabels (
4447 "mithril_aggregator_cardano_db_partial_restoration_since_startup" ,
4548 "Number of partial Cardano database restoration since startup on a Mithril aggregator node" ,
46- & [ ORIGIN_TAG_LABEL ]
49+ & [ CLIENT_ORIGIN_TAG_LABEL ]
4750 ) ,
4851 artifact_detail_cardano_database_total_served_since_startup: MetricCounterWithLabels (
4952 "mithril_aggregator_artifact_detail_cardano_database_total_served_since_startup" ,
5053 "Number of Cardano database artifact details served since startup on a Mithril aggregator node" ,
51- & [ ORIGIN_TAG_LABEL ]
54+ & [ CLIENT_ORIGIN_TAG_LABEL ]
5255 ) ,
5356 artifact_detail_mithril_stake_distribution_total_served_since_startup: MetricCounterWithLabels (
5457 "mithril_aggregator_artifact_detail_mithril_stake_distribution_total_served_since_startup" ,
5558 "Number of Mithril stake distribution artifact details served since startup on a Mithril aggregator node" ,
56- & [ ORIGIN_TAG_LABEL ]
59+ & [ CLIENT_ORIGIN_TAG_LABEL ]
5760 ) ,
5861 artifact_detail_cardano_stake_distribution_total_served_since_startup: MetricCounterWithLabels (
5962 "mithril_aggregator_artifact_detail_cardano_stake_distribution_total_served_since_startup" ,
6063 "Number of Cardano stake distribution artifact details served since startup on a Mithril aggregator node" ,
61- & [ ORIGIN_TAG_LABEL ]
64+ & [ CLIENT_ORIGIN_TAG_LABEL ]
6265 ) ,
6366 artifact_detail_cardano_transaction_total_served_since_startup: MetricCounterWithLabels (
6467 "mithril_aggregator_artifact_detail_cardano_transaction_total_served_since_startup" ,
6568 "Number of Cardano transaction artifact details served since startup on a Mithril aggregator node" ,
66- & [ ORIGIN_TAG_LABEL ]
69+ & [ CLIENT_ORIGIN_TAG_LABEL ]
6770 ) ,
6871 proof_cardano_transaction_total_proofs_served_since_startup: MetricCounterWithLabels (
6972 "mithril_aggregator_proof_cardano_transaction_total_proofs_served_since_startup" ,
7073 "Number of Cardano transaction proofs served since startup on a Mithril aggregator node" ,
71- & [ ORIGIN_TAG_LABEL ]
74+ & [ CLIENT_ORIGIN_TAG_LABEL ]
7275 ) ,
7376 proof_cardano_transaction_total_transactions_served_since_startup: MetricCounterWithLabels (
7477 "mithril_aggregator_proof_cardano_transaction_total_transactions_served_since_startup" ,
7578 "Number of Cardano transaction hashes requested for proof since startup on a Mithril aggregator node" ,
76- & [ ORIGIN_TAG_LABEL ]
79+ & [ CLIENT_ORIGIN_TAG_LABEL ]
7780 ) ,
7881 signer_registration_total_received_since_startup: MetricCounterWithLabels (
7982 "mithril_aggregator_signer_registration_total_received_since_startup" ,
8083 "Number of signer registrations received since startup on a Mithril aggregator node" ,
81- & [ ORIGIN_TAG_LABEL ]
84+ & [ SIGNER_REGISTRATION_ORIGIN_TAG_LABEL ]
8285 ) ,
8386 signature_registration_total_received_since_startup: MetricCounterWithLabels (
8487 "mithril_aggregator_signature_registration_total_received_since_startup" ,
8588 "Number of signature registrations received since startup on a Mithril aggregator node" ,
86- & [ ORIGIN_TAG_LABEL ]
89+ & [ SIGNER_SIGNATURE_ORIGIN_TAG_LABEL ]
8790 ) ,
8891 certificate_total_produced_since_startup: MetricCounter (
8992 "mithril_aggregator_certificate_total_produced_since_startup" ,
0 commit comments