From 778f3b927253eb02904b76ebc8d1c03ebb897086 Mon Sep 17 00:00:00 2001 From: Jaydip Gabani Date: Fri, 12 Apr 2024 22:48:32 +0000 Subject: [PATCH 1/3] correcting metrics names Signed-off-by: Jaydip Gabani --- website/docs/metrics.md | 10 +++++----- website/versioned_docs/version-v3.15.x/metrics.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/website/docs/metrics.md b/website/docs/metrics.md index d3b1c16f93b..b7bef99bac7 100644 --- a/website/docs/metrics.md +++ b/website/docs/metrics.md @@ -108,7 +108,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `LastValue` -- Name: `gatekeeper_constraint_template_ingestion_count` +- Name: `gatekeeper_constraint_template_ingestion_count_total` Description: `Total number of constraint template ingestion actions` @@ -142,7 +142,7 @@ Below are the list of metrics provided by Gatekeeper: ### Webhook -- Name: `gatekeeper_validation_request_count` +- Name: `gatekeeper_validation_request_count_total` Description: `The number of requests that are routed to validation webhook` @@ -164,7 +164,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Distribution` -- Name: `gatekeeper_mutation_request_count` +- Name: `gatekeeper_mutation_request_count_total ` Description: `The number of requests that are routed to mutation webhook` @@ -216,7 +216,7 @@ Below are the list of metrics provided by Gatekeeper: ### Mutation -- Name: `gatekeeper_mutator_ingestion_count` +- Name: `gatekeeper_mutator_ingestion_count_total` Description: `Total number of Mutator ingestion actions` @@ -246,7 +246,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Count` -- Name: `gatekeeper_mutator_conflicting_count` +- Name: `gatekeeper_mutator_conflicting_count_total` Description: `The current number of conflicting Mutator objects` diff --git a/website/versioned_docs/version-v3.15.x/metrics.md b/website/versioned_docs/version-v3.15.x/metrics.md index d3b1c16f93b..b7bef99bac7 100644 --- a/website/versioned_docs/version-v3.15.x/metrics.md +++ b/website/versioned_docs/version-v3.15.x/metrics.md @@ -108,7 +108,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `LastValue` -- Name: `gatekeeper_constraint_template_ingestion_count` +- Name: `gatekeeper_constraint_template_ingestion_count_total` Description: `Total number of constraint template ingestion actions` @@ -142,7 +142,7 @@ Below are the list of metrics provided by Gatekeeper: ### Webhook -- Name: `gatekeeper_validation_request_count` +- Name: `gatekeeper_validation_request_count_total` Description: `The number of requests that are routed to validation webhook` @@ -164,7 +164,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Distribution` -- Name: `gatekeeper_mutation_request_count` +- Name: `gatekeeper_mutation_request_count_total ` Description: `The number of requests that are routed to mutation webhook` @@ -216,7 +216,7 @@ Below are the list of metrics provided by Gatekeeper: ### Mutation -- Name: `gatekeeper_mutator_ingestion_count` +- Name: `gatekeeper_mutator_ingestion_count_total` Description: `Total number of Mutator ingestion actions` @@ -246,7 +246,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Count` -- Name: `gatekeeper_mutator_conflicting_count` +- Name: `gatekeeper_mutator_conflicting_count_total` Description: `The current number of conflicting Mutator objects` From eca1efe78efdf2e3fd5c556d23815f86466e9742 Mon Sep 17 00:00:00 2001 From: Jaydip Gabani Date: Mon, 15 Apr 2024 17:55:56 +0000 Subject: [PATCH 2/3] adding note for cumulative metrics Signed-off-by: Jaydip Gabani --- website/docs/metrics.md | 2 ++ website/versioned_docs/version-v3.15.x/metrics.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/website/docs/metrics.md b/website/docs/metrics.md index b7bef99bac7..e11b3dcfddd 100644 --- a/website/docs/metrics.md +++ b/website/docs/metrics.md @@ -80,6 +80,8 @@ In the excerpt above, notice `templateRunTimeNS` and `constraintCount`. The form The additional log volume from enabling the stats logging can be quite high. ## Metrics +> If you are using a Prometheus client library, for counter metrics, the _total suffix is recommended and sometimes automatically appended by client libraries to indicate that the metric represents a cumulative total. + Below are the list of metrics provided by Gatekeeper: ### Constraint diff --git a/website/versioned_docs/version-v3.15.x/metrics.md b/website/versioned_docs/version-v3.15.x/metrics.md index b7bef99bac7..e11b3dcfddd 100644 --- a/website/versioned_docs/version-v3.15.x/metrics.md +++ b/website/versioned_docs/version-v3.15.x/metrics.md @@ -80,6 +80,8 @@ In the excerpt above, notice `templateRunTimeNS` and `constraintCount`. The form The additional log volume from enabling the stats logging can be quite high. ## Metrics +> If you are using a Prometheus client library, for counter metrics, the _total suffix is recommended and sometimes automatically appended by client libraries to indicate that the metric represents a cumulative total. + Below are the list of metrics provided by Gatekeeper: ### Constraint From 686d373d9ead8d1386c69efa8dc7bca71222d782 Mon Sep 17 00:00:00 2001 From: Jaydip Gabani Date: Thu, 18 Apr 2024 17:55:53 +0000 Subject: [PATCH 3/3] removing _total from metrics names Signed-off-by: Jaydip Gabani --- website/docs/metrics.md | 10 +++++----- website/versioned_docs/version-v3.15.x/metrics.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/website/docs/metrics.md b/website/docs/metrics.md index e11b3dcfddd..fc3f6bf44ec 100644 --- a/website/docs/metrics.md +++ b/website/docs/metrics.md @@ -110,7 +110,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `LastValue` -- Name: `gatekeeper_constraint_template_ingestion_count_total` +- Name: `gatekeeper_constraint_template_ingestion_count` Description: `Total number of constraint template ingestion actions` @@ -144,7 +144,7 @@ Below are the list of metrics provided by Gatekeeper: ### Webhook -- Name: `gatekeeper_validation_request_count_total` +- Name: `gatekeeper_validation_request_count` Description: `The number of requests that are routed to validation webhook` @@ -166,7 +166,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Distribution` -- Name: `gatekeeper_mutation_request_count_total ` +- Name: `gatekeeper_mutation_request_count ` Description: `The number of requests that are routed to mutation webhook` @@ -218,7 +218,7 @@ Below are the list of metrics provided by Gatekeeper: ### Mutation -- Name: `gatekeeper_mutator_ingestion_count_total` +- Name: `gatekeeper_mutator_ingestion_count` Description: `Total number of Mutator ingestion actions` @@ -248,7 +248,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Count` -- Name: `gatekeeper_mutator_conflicting_count_total` +- Name: `gatekeeper_mutator_conflicting_count` Description: `The current number of conflicting Mutator objects` diff --git a/website/versioned_docs/version-v3.15.x/metrics.md b/website/versioned_docs/version-v3.15.x/metrics.md index e11b3dcfddd..fc3f6bf44ec 100644 --- a/website/versioned_docs/version-v3.15.x/metrics.md +++ b/website/versioned_docs/version-v3.15.x/metrics.md @@ -110,7 +110,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `LastValue` -- Name: `gatekeeper_constraint_template_ingestion_count_total` +- Name: `gatekeeper_constraint_template_ingestion_count` Description: `Total number of constraint template ingestion actions` @@ -144,7 +144,7 @@ Below are the list of metrics provided by Gatekeeper: ### Webhook -- Name: `gatekeeper_validation_request_count_total` +- Name: `gatekeeper_validation_request_count` Description: `The number of requests that are routed to validation webhook` @@ -166,7 +166,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Distribution` -- Name: `gatekeeper_mutation_request_count_total ` +- Name: `gatekeeper_mutation_request_count ` Description: `The number of requests that are routed to mutation webhook` @@ -218,7 +218,7 @@ Below are the list of metrics provided by Gatekeeper: ### Mutation -- Name: `gatekeeper_mutator_ingestion_count_total` +- Name: `gatekeeper_mutator_ingestion_count` Description: `Total number of Mutator ingestion actions` @@ -248,7 +248,7 @@ Below are the list of metrics provided by Gatekeeper: Aggregation: `Count` -- Name: `gatekeeper_mutator_conflicting_count_total` +- Name: `gatekeeper_mutator_conflicting_count` Description: `The current number of conflicting Mutator objects`