Skip to content

(EAI-1247) Prometheus alerts for 429 rate limit errors #864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions packages/chatbot-server-mongodb-public/environments/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,40 @@ prometheusRules:
annotations:
summary: High HTTP 500 Error rate on {$labels.job}
description: Too many HTTP 500 Errors on {$labels.job} in the last 5 minutes
- alert: HighRateLimitErrors
expr: |
(
rate(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 0.1
) or (
increase(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 10
)
for: 2m
labels:
severity: warning
category: performance
annotations:
summary: "High rate of 429 (rate limit) errors detected"
description: |
Service {{ $labels.service }} is experiencing high rate limit errors.
Current rate: {{ $value | printf "%.2f" }} errors/second
This may indicate:
- Client retry storms
- Insufficient rate limiting configuration
- Upstream service throttling
- alert: CriticalRateLimitErrors
expr: |
(
rate(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 1.0
) or (
increase(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 50
)
for: 1m
labels:
severity: critical
category: performance
annotations:
summary: "Critical rate of 429 (rate limit) errors"
description: |
Service {{ $labels.service }} is experiencing critical rate limit errors.
Current rate: {{ $value | printf "%.2f" }} errors/second
Immediate investigation required - service may be degraded.
37 changes: 37 additions & 0 deletions packages/chatbot-server-mongodb-public/environments/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,40 @@ prometheusRules:
annotations:
summary: High HTTP 500 Error rate on {$labels.job}
description: Too many HTTP 500 Errors on {$labels.job} in the last 5 minutes
- alert: HighRateLimitErrors
expr: |
(
rate(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 0.1
) or (
increase(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 10
)
for: 2m
labels:
severity: warning
category: performance
annotations:
summary: "High rate of 429 (rate limit) errors detected"
description: |
Service {{ $labels.service }} is experiencing high rate limit errors.
Current rate: {{ $value | printf "%.2f" }} errors/second
This may indicate:
- Client retry storms
- Insufficient rate limiting configuration
- Upstream service throttling
- alert: CriticalRateLimitErrors
expr: |
(
rate(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 1.0
) or (
increase(http_requests_total{namespace="docs",container="docs-chat",code="429"}[5m]) > 50
)
for: 1m
labels:
severity: critical
category: performance
annotations:
summary: "Critical rate of 429 (rate limit) errors"
description: |
Service {{ $labels.service }} is experiencing critical rate limit errors.
Current rate: {{ $value | printf "%.2f" }} errors/second
Immediate investigation required - service may be degraded.