observability-triage
БесплатноЗапускает вложенные скриптыНе проверенTriage OpenSEO production errors in Cloudflare Workers Observability — verified query recipes, counting gotchas, a known-noise filter list applied…
от every-app★ 29 413 звёзд на GitHubОб этом скилле
Observability triage
Query Cloudflare Workers Observability for prod errors, count them correctly, and skip the noise that has already been investigated to a dead end. Apply the known-noise list below without re-investigating those entries.
Access
- Resolve the account at runtime — never hardcode it: the
cloudflare-apiMCP server pre-bindsaccountIdinmcp__cloudflare-api__execute, andnpx wrangler whoamiprints it. The workers to triage are the ones this repo deploys (seedeploy/alchemy/alchemy.run.ts): the main app worker plus the aux workers (audit engine, landing, self-host). - Query via the
cloudflare-apiMCP server (mcp__cloudflare-api__execute). If its tools are absent, run its authenticate flow and give the user the URL — wrangler's OAuth token gets a 403 on the observability API (missing scope), so don't burn time on curl-with-wrangler-token. - PostHog is the second error source but cannot see
exceededMemory/canceled/responseStreamDisconnectedoutcomes — worker-outcome questions are answerable only here.
Query recipes (verified shapes)
POST /accounts/{account_id}/workers/observability/telemetry/query. All of these are load-bearing; the API's 400s are opaque:
queryId: "adhoc"is required. Timeframe is epoch milliseconds:timeframe: { from, to }.Count invocations by outcome:
{ "queryId": "adhoc", "timeframe": { "from": 0, "to": 0 }, "parameters": { "datasets": ["cloudflare-workers"], "filters": [ { "key": "$metadata.type", "operation": "eq", "value": "cf-worker-event", "type": "string" } ], "calculations": [{ "operator": "count", "alias": "count" }], "groupBys": [ { "value": "$workers.scriptName", "type": "string" }, { "value": "$workers.outcome", "type": "string" } ], "limit": 100 }, "view": "calculations", "limit": 100 }The
cf-worker-eventfilter is what makes counts mean invocations; without it you count every log line.Raw samples:
view: "events", emptycalculations/groupBys, smalllimit. Events carry$metadata(service,trigger,level,message,fingerprint,requestId) and$workers(outcome,scriptName,scriptVersion,wallTimeMs,cpuTimeMs,eventType).Error-level app logs grouped by message: filter
$metadata.level eq error, groupBy$metadata.message.Verified filter operations:
eq,neq. Percentiles: the API wants"median", not"p50". Filter for substrings client-side on fetched events.Useful drill-downs: groupBy
$metadata.trigger(route),$workers.scriptVersion(did a deploy change the rate mid-window),$workers.event.request.headers.user-agent.
Counting gotchas
- Grouped results are unsorted and effectively capped (~10 rows returned regardless of
limit). A missing group ≠ zero. To see error outcomes, add$workers.outcome neq okinstead of hoping the error rows make the cut; sort client-side. - One isolate death fans out. An OOM kills every request pinned to the isolate at the same instant — cluster raw OOM events by timestamp before reading the count as user impact.
- Message prefixes fragment groups. Logs with leading timestamps (better-auth's format) split one error into N single-count groups; grouped-by-message counts badly understate them. Sample events and merge client-side.
- Prod deploys are manual — main being fixed doesn't mean prod runs the fix. Check
$workers.scriptVersionand the scripts'modified_onbefore concluding a fix didn't work.
Workflow failures
- An Error logged as an argument loses its message.
console.error("x failed:", error)lands in Workers Logs asx failed: at async …(frames only, noError: messageline), and an Error inside a logged object serializes to{remote: true}or{}. Grep the stack for the call site, then read the real message fromdescribeError(error)in the newer log lines (src/server/lib/errors.ts) or from the Workflows instance below. - The engine records why a step attempt failed.
GET /accounts/{account_id}/workflows/{workflow_name}/instances?status=errored&date_start=<iso>lists errored instances (workflow names are inwrangler.jsonc:ai-visibility-workflow,rank-check-workflow,site-audit-workflowon the audit worker,local-rank-workflow);GET …/instances/{id}returnserrorplus every step with its attempts and each attempt'serror.name/error.message. This is the only place the message of a step failure survives. WorkflowInternalError: Attempt failed due to internal workflows erroron an attempt is the engine's own failure, not app code: the invocation running the step is reportedcanceledabout 30 s later. It comes in bursts that line up with Cloudflare status incidents (Workflows, Durable Objects, or a network incident in the Ashburn region that hosts prod). The same bursts make the binding'screate()reject (`at async
Установить observability-triage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл observability-triage?
Triage OpenSEO production errors in Cloudflare Workers Observability — verified query recipes, counting gotchas, a known-noise filter list applied automatically, and the on-demand CPU/heap profiling recipe. Use when asked to review Cloudflare logs/observability, count OOMs or worker errors, compare error rates between periods, investigate a prod error spike, or find where a worker spends CPU or memory (profiles, flamegraphs).
Как установить скилл observability-triage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл observability-triage запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub