From 9c9bc09f526d46c095c9d82b6ae7761c64281d4c Mon Sep 17 00:00:00 2001 From: vimtor Date: Thu, 7 May 2026 13:58:41 +0200 Subject: [PATCH] chore: fix free tier query --- infra/monitoring.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/infra/monitoring.ts b/infra/monitoring.ts index e976044707..baf1f5d68b 100644 --- a/infra/monitoring.ts +++ b/infra/monitoring.ts @@ -175,22 +175,17 @@ new honeycomb.Trigger("IncreasedFreeTierRequests", { name: "Increased Free Tier Requests", description, queryJson: honeycomb.getQuerySpecificationOutput({ - calculations: [ - { - op: "COUNT", - filterCombination: "AND", - filters: [ - { column: "event_type", op: "=", value: "completions" }, - { column: "user_agent", op: "contains", value: "opencode" }, - { column: "isFreeTier", op: "=", value: "true" }, - ], - }, + calculations: [{ op: "COUNT" }], + filters: [ + { column: "event_type", op: "=", value: "completions" }, + { column: "user_agent", op: "contains", value: "opencode" }, + { column: "isFreeTier", op: "=", value: "true" }, ], - timeRange: 14400, + timeRange: 3600, }).json, alertType: "on_change", - frequency: 3600, - thresholds: [{ op: ">=", value: 50, exceededLimit: 2 }], + frequency: 900, + thresholds: [{ op: ">=", value: 50, exceededLimit: 1 }], baselineDetails: [{ type: "percentage", offsetMinutes: 1440 }], recipients: [ {