MCPcopy Create free account
hub / github.com/anomalyco/opencode / modelLowTpsQuery

Function modelLowTpsQuery

infra/monitoring.ts:132–158  ·  view source on GitHub ↗
(product: "go" | "zen")

Source from the content-addressed store, hash-verified

130}
131
132const modelLowTpsQuery = (product: "go" | "zen") => {
133 const filters = [
134 { column: "model", op: "exists" },
135 { column: "event_type", op: "=", value: "completions" },
136 { column: "user_agent", op: "contains", value: "opencode" },
137 { column: "isGoTier", op: "=", value: product === "go" ? "true" : "false" },
138 { column: "status", op: ">=", value: "200" },
139 { column: "status", op: "<", value: "400" },
140 { column: "tps.output", op: "exists" },
141 ]
142
143 return honeycombio.getQuerySpecificationOutput({
144 breakdowns: ["model"],
145 calculations: [
146 { op: "COUNT", name: "TOTAL", filterCombination: "AND", filters },
147 {
148 op: "P50",
149 name: "TPS",
150 column: "tps.output",
151 filterCombination: "AND",
152 filters,
153 },
154 ],
155 formulas: [{ name: "LOW_TPS", expression: "IF(GTE($TOTAL, 100), $TPS, 999)" }],
156 timeRange: 1800,
157 }).json
158}
159
160new honeycombio.Trigger("IncreasedModelHttpErrorsGo", {
161 name: "Increased Model HTTP Errors [Go]",

Callers 1

monitoring.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected