chore: make provider down queries live

This commit is contained in:
vimtor 2026-05-07 10:56:37 +02:00
parent 1219691c11
commit cee04f2924
No known key found for this signature in database
2 changed files with 18 additions and 17 deletions

View File

@ -30,6 +30,7 @@ export const api = new sst.cloudflare.Worker("Api", {
transform: { transform: {
worker: (args) => { worker: (args) => {
args.logpush = true args.logpush = true
if ($app.stage === "vimtor") return
args.bindings = $resolve(args.bindings).apply((bindings) => [ args.bindings = $resolve(args.bindings).apply((bindings) => [
...bindings, ...bindings,
{ {

View File

@ -88,7 +88,7 @@ const providerHttpErrorsQuery = (product: "go" | "zen") => {
formulas: [ formulas: [
{ name: "ERROR", expression: "IF(GTE(SUM($SUCCESS, $FAILED), 500), DIV($FAILED, SUM($SUCCESS, $FAILED)), 0)" }, { name: "ERROR", expression: "IF(GTE(SUM($SUCCESS, $FAILED), 500), DIV($FAILED, SUM($SUCCESS, $FAILED)), 0)" },
], ],
timeRange: 900, timeRange: 1800,
}).json }).json
} }
@ -140,14 +140,14 @@ new honeycomb.Trigger("IncreasedProviderHttpErrorsGo", {
frequency: 300, frequency: 300,
thresholds: [{ op: ">=", value: 0.8, exceededLimit: 1 }], thresholds: [{ op: ">=", value: 0.8, exceededLimit: 1 }],
recipients: [ recipients: [
// { {
// id: webhookRecipient.id, id: webhookRecipient.id,
// notificationDetails: [ notificationDetails: [
// { {
// variables: [{ name: "type", value: "provider_http_errors" }], variables: [{ name: "type", value: "provider_http_errors" }],
// }, },
// ], ],
// }, },
], ],
}) })
@ -159,13 +159,13 @@ new honeycomb.Trigger("IncreasedProviderHttpErrorsZen", {
frequency: 300, frequency: 300,
thresholds: [{ op: ">=", value: 0.8, exceededLimit: 1 }], thresholds: [{ op: ">=", value: 0.8, exceededLimit: 1 }],
recipients: [ recipients: [
// { {
// id: webhookRecipient.id, id: webhookRecipient.id,
// notificationDetails: [ notificationDetails: [
// { {
// variables: [{ name: "type", value: "provider_http_errors" }], variables: [{ name: "type", value: "provider_http_errors" }],
// }, },
// ], ],
// }, },
], ],
}) })