From cee04f2924b16718bd7f60b05a1e946c17f8ea7e Mon Sep 17 00:00:00 2001 From: vimtor Date: Thu, 7 May 2026 10:56:37 +0200 Subject: [PATCH] chore: make provider down queries live --- infra/app.ts | 1 + infra/monitoring.ts | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/infra/app.ts b/infra/app.ts index bb627f51ec..2ede5a1f4a 100644 --- a/infra/app.ts +++ b/infra/app.ts @@ -30,6 +30,7 @@ export const api = new sst.cloudflare.Worker("Api", { transform: { worker: (args) => { args.logpush = true + if ($app.stage === "vimtor") return args.bindings = $resolve(args.bindings).apply((bindings) => [ ...bindings, { diff --git a/infra/monitoring.ts b/infra/monitoring.ts index 1da54fe63d..9956e2ed70 100644 --- a/infra/monitoring.ts +++ b/infra/monitoring.ts @@ -88,7 +88,7 @@ const providerHttpErrorsQuery = (product: "go" | "zen") => { formulas: [ { name: "ERROR", expression: "IF(GTE(SUM($SUCCESS, $FAILED), 500), DIV($FAILED, SUM($SUCCESS, $FAILED)), 0)" }, ], - timeRange: 900, + timeRange: 1800, }).json } @@ -140,14 +140,14 @@ new honeycomb.Trigger("IncreasedProviderHttpErrorsGo", { frequency: 300, thresholds: [{ op: ">=", value: 0.8, exceededLimit: 1 }], recipients: [ - // { - // id: webhookRecipient.id, - // notificationDetails: [ - // { - // variables: [{ name: "type", value: "provider_http_errors" }], - // }, - // ], - // }, + { + id: webhookRecipient.id, + notificationDetails: [ + { + variables: [{ name: "type", value: "provider_http_errors" }], + }, + ], + }, ], }) @@ -159,13 +159,13 @@ new honeycomb.Trigger("IncreasedProviderHttpErrorsZen", { frequency: 300, thresholds: [{ op: ">=", value: 0.8, exceededLimit: 1 }], recipients: [ - // { - // id: webhookRecipient.id, - // notificationDetails: [ - // { - // variables: [{ name: "type", value: "provider_http_errors" }], - // }, - // ], - // }, + { + id: webhookRecipient.id, + notificationDetails: [ + { + variables: [{ name: "type", value: "provider_http_errors" }], + }, + ], + }, ], })