@@ -5,85 +5,88 @@ use mithril_metric::{build_metrics_service, MetricCounterWithLabels, MetricsServ
5
5
use mithril_metric:: metric:: { MetricCollector , MetricCounter } ;
6
6
use prometheus:: proto:: { LabelPair , MetricFamily } ;
7
7
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" ;
9
12
10
13
build_metrics_service ! (
11
14
MetricsService ,
12
15
13
16
certificate_detail_total_served_since_startup: MetricCounterWithLabels (
14
17
"certificate_detail_total_served_since_startup" ,
15
18
"Number of certificate details served since startup on a Mithril aggregator node" ,
16
- & [ ORIGIN_TAG_LABEL ]
19
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
17
20
) ,
18
21
artifact_detail_cardano_immutable_files_full_total_served_since_startup: MetricCounterWithLabels (
19
22
"mithril_aggregator_artifact_detail_cardano_db_total_served_since_startup" ,
20
23
"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 ]
22
25
) ,
23
26
cardano_immutable_files_full_total_restoration_since_startup: MetricCounterWithLabels (
24
27
"mithril_aggregator_cardano_db_total_restoration_since_startup" ,
25
28
"Number of Cardano immutable files full restorations since startup on a Mithril aggregator node" ,
26
- & [ ORIGIN_TAG_LABEL ]
29
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
27
30
) ,
28
31
cardano_database_immutable_files_restored_since_startup: MetricCounterWithLabels (
29
32
"mithril_aggregator_cardano_db_immutable_files_restored_since_startup" ,
30
33
"Number of Cardano immutable files restored since startup on a Mithril aggregator node" ,
31
- & [ ORIGIN_TAG_LABEL ]
34
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
32
35
) ,
33
36
cardano_database_ancillary_files_restored_since_startup: MetricCounterWithLabels (
34
37
"mithril_aggregator_cardano_db_ancillary_files_restored_since_startup" ,
35
38
"Number of Cardano ancillary files restored since startup on a Mithril aggregator node" ,
36
- & [ ORIGIN_TAG_LABEL ]
39
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
37
40
) ,
38
41
cardano_database_complete_restoration_since_startup: MetricCounterWithLabels (
39
42
"mithril_aggregator_cardano_db_complete_restoration_since_startup" ,
40
43
"Number of complete Cardano database restoration since startup on a Mithril aggregator node" ,
41
- & [ ORIGIN_TAG_LABEL ]
44
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
42
45
) ,
43
46
cardano_database_partial_restoration_since_startup: MetricCounterWithLabels (
44
47
"mithril_aggregator_cardano_db_partial_restoration_since_startup" ,
45
48
"Number of partial Cardano database restoration since startup on a Mithril aggregator node" ,
46
- & [ ORIGIN_TAG_LABEL ]
49
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
47
50
) ,
48
51
artifact_detail_cardano_database_total_served_since_startup: MetricCounterWithLabels (
49
52
"mithril_aggregator_artifact_detail_cardano_database_total_served_since_startup" ,
50
53
"Number of Cardano database artifact details served since startup on a Mithril aggregator node" ,
51
- & [ ORIGIN_TAG_LABEL ]
54
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
52
55
) ,
53
56
artifact_detail_mithril_stake_distribution_total_served_since_startup: MetricCounterWithLabels (
54
57
"mithril_aggregator_artifact_detail_mithril_stake_distribution_total_served_since_startup" ,
55
58
"Number of Mithril stake distribution artifact details served since startup on a Mithril aggregator node" ,
56
- & [ ORIGIN_TAG_LABEL ]
59
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
57
60
) ,
58
61
artifact_detail_cardano_stake_distribution_total_served_since_startup: MetricCounterWithLabels (
59
62
"mithril_aggregator_artifact_detail_cardano_stake_distribution_total_served_since_startup" ,
60
63
"Number of Cardano stake distribution artifact details served since startup on a Mithril aggregator node" ,
61
- & [ ORIGIN_TAG_LABEL ]
64
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
62
65
) ,
63
66
artifact_detail_cardano_transaction_total_served_since_startup: MetricCounterWithLabels (
64
67
"mithril_aggregator_artifact_detail_cardano_transaction_total_served_since_startup" ,
65
68
"Number of Cardano transaction artifact details served since startup on a Mithril aggregator node" ,
66
- & [ ORIGIN_TAG_LABEL ]
69
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
67
70
) ,
68
71
proof_cardano_transaction_total_proofs_served_since_startup: MetricCounterWithLabels (
69
72
"mithril_aggregator_proof_cardano_transaction_total_proofs_served_since_startup" ,
70
73
"Number of Cardano transaction proofs served since startup on a Mithril aggregator node" ,
71
- & [ ORIGIN_TAG_LABEL ]
74
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
72
75
) ,
73
76
proof_cardano_transaction_total_transactions_served_since_startup: MetricCounterWithLabels (
74
77
"mithril_aggregator_proof_cardano_transaction_total_transactions_served_since_startup" ,
75
78
"Number of Cardano transaction hashes requested for proof since startup on a Mithril aggregator node" ,
76
- & [ ORIGIN_TAG_LABEL ]
79
+ & [ CLIENT_ORIGIN_TAG_LABEL ]
77
80
) ,
78
81
signer_registration_total_received_since_startup: MetricCounterWithLabels (
79
82
"mithril_aggregator_signer_registration_total_received_since_startup" ,
80
83
"Number of signer registrations received since startup on a Mithril aggregator node" ,
81
- & [ ORIGIN_TAG_LABEL ]
84
+ & [ SIGNER_REGISTRATION_ORIGIN_TAG_LABEL ]
82
85
) ,
83
86
signature_registration_total_received_since_startup: MetricCounterWithLabels (
84
87
"mithril_aggregator_signature_registration_total_received_since_startup" ,
85
88
"Number of signature registrations received since startup on a Mithril aggregator node" ,
86
- & [ ORIGIN_TAG_LABEL ]
89
+ & [ SIGNER_SIGNATURE_ORIGIN_TAG_LABEL ]
87
90
) ,
88
91
certificate_total_produced_since_startup: MetricCounter (
89
92
"mithril_aggregator_certificate_total_produced_since_startup" ,
0 commit comments