Procházet zdrojové kódy

chore: fix free tier query

vimtor před 3 měsíci
rodič
revize
9c9bc09f52
1 změnil soubory, kde provedl 8 přidání a 13 odebrání
  1. 8 13
      infra/monitoring.ts

+ 8 - 13
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: [
     {