fix(infra): Filter out WebSocket upgrade from latency alerting (#7242)

This commit is contained in:
Jamil
2024-11-02 15:43:49 -07:00
committed by GitHub
parent 7daa1a9ec3
commit 2825522844

View File

@@ -431,7 +431,8 @@ resource "google_monitoring_alert_policy" "load_balancer_latency_policy" {
display_name = "Load balancer latency"
condition_threshold {
filter = "resource.type = \"https_lb_rule\" AND metric.type = \"loadbalancing.googleapis.com/https/backend_latencies\""
# Filter out HTTP 101 responses (switching protocols) to prevent WebSocket connections from triggering the alert
filter = "metric.labels.response_code != \"101\" AND resource.type = \"https_lb_rule\" AND metric.type = \"loadbalancing.googleapis.com/https/backend_latencies\""
comparison = "COMPARISON_GT"
threshold_value = 1000
duration = "0s"