Skip to content

Commit

Permalink
chore: tweak default mapper configuration for Prometheus
Browse files Browse the repository at this point in the history
Signed-off-by: Rolf Ahrenberg <[email protected]>
  • Loading branch information
rofafor committed Dec 5, 2024
1 parent 9cf5ea8 commit 0daf10d
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions src/stats/prom/default_mapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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"

0 comments on commit 0daf10d

Please sign in to comment.