Skip to content

Commit 36f8b7e

Browse files
committed
chore: reduce alerts false positives
1 parent f4337df commit 36f8b7e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

infra/monitoring.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const modelHttpErrorsQuery = (product: "go" | "zen") => {
3838
calculatedFields: [
3939
{
4040
name: "is_failed_http_status",
41-
expression: `IF(AND(GTE($status, "400"), NOT(EQUALS($status, "401"))), 1, 0)`,
41+
expression: product === "go"
42+
? `IF(AND(GTE($status, "400"), NOT(EQUALS($status, "401")), NOT(EQUALS($status, "429"))), 1, 0)`
43+
: `IF(AND(GTE($status, "400"), NOT(EQUALS($status, "401"))), 1, 0)`,
4244
},
4345
],
4446
calculations: [
@@ -66,7 +68,7 @@ const providerHttpErrorsQuery = (product: "go" | "zen") => {
6668
},
6769
{
6870
name: "is_failed_provider_http_status",
69-
expression: `IF(GTE($llm.error.code, "400"), 1, 0)`,
71+
expression: `IF(GT($llm.error.code, "400"), 1, 0)`,
7072
},
7173
],
7274
calculations: [

0 commit comments

Comments
 (0)