From 5992d5c1e592814853f4733f6254602b27645c24 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Tue, 26 Nov 2024 15:17:57 +0200 Subject: [PATCH] chore: tweak default mapper configuration for Prometheus Signed-off-by: Rolf Ahrenberg --- src/stats/prom/default_mapper.yaml | 36 ++++++++++++++++++------------ 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/stats/prom/default_mapper.yaml b/src/stats/prom/default_mapper.yaml index df30b1dc..52bdd91a 100644 --- a/src/stats/prom/default_mapper.yaml +++ b/src/stats/prom/default_mapper.yaml @@ -24,35 +24,53 @@ mappings: labels: domain: "$1" key1: "$2" + - match: "ratelimit.service.rate_limit.*.*.shadow_mode" + name: "ratelimit_service_rate_limit_shadow_mode" + timer_type: "histogram" + labels: + domain: "$1" + key1: "$2" - - match: "ratelimit.service.rate_limit.*.*.*.near_limit" + - match: "ratelimit\\.service\\.rate_limit\\.(.*)\\.(.*)\\.(.*)(\\..*)\\.near_limit" + match_type: regex name: "ratelimit_service_rate_limit_near_limit" timer_type: "histogram" labels: domain: "$1" key1: "$2" key2: "$3" - - match: "ratelimit.service.rate_limit.*.*.*.over_limit" + - match: "ratelimit\\.service\\.rate_limit\\.(.*)\\.(.*)\\.(.*)(\\..*)\\.over_limit" + match_type: regex name: "ratelimit_service_rate_limit_over_limit" timer_type: "histogram" labels: domain: "$1" key1: "$2" key2: "$3" - - match: "ratelimit.service.rate_limit.*.*.*.total_hits" + - match: "ratelimit\\.service\\.rate_limit\\.(.*)\\.(.*)\\.(.*)(\\..*)\\.total_hits" + match_type: regex name: "ratelimit_service_rate_limit_total_hits" timer_type: "histogram" labels: domain: "$1" key1: "$2" key2: "$3" - - match: "ratelimit.service.rate_limit.*.*.*.within_limit" + - match: "ratelimit\\.service\\.rate_limit\\.(.*)\\.(.*)\\.(.*)(\\..*)\\.within_limit" + match_type: regex name: "ratelimit_service_rate_limit_within_limit" timer_type: "histogram" labels: domain: "$1" key1: "$2" key2: "$3" + - match: "ratelimit\\.service\\.rate_limit\\.(.*)\\.(.*)\\.(.*)(\\..*)\\.shadow_mode" + match_type: regex + name: "ratelimit_service_rate_limit_shadow_mode" + timer_type: "histogram" + labels: + domain: "$1" + key1: "$2" + key2: "$3" - match: "ratelimit.service.call.should_rate_limit.*" name: "ratelimit_service_should_rate_limit_error" @@ -65,7 +83,6 @@ mappings: match_metric_type: counter labels: grpc_method: "$1" - - match: "ratelimit_server.*.response_time" name: "ratelimit_service_response_time_seconds" timer_type: histogram @@ -75,15 +92,6 @@ mappings: - match: "ratelimit.service.config_load_success" name: "ratelimit_service_config_load_success" match_metric_type: counter - - match: "ratelimit.service.config_load_error" name: "ratelimit_service_config_load_error" match_metric_type: counter - - - match: "ratelimit.service.rate_limit.*.*.*.shadow_mode" - name: "ratelimit_service_rate_limit_shadow_mode" - timer_type: "histogram" - labels: - domain: "$1" - key1: "$2" - key2: "$3"