cloudflare-workers-otel-utels
Installation
SKILL.md
Cloudflare Workers OTel + utels boundary
Two wrappers that compose around a Worker's {fetch, scheduled} handler. Both are no-op pass-throughs unless their env vars are present, so you can run with neither, just one, or both.
withUtelsErrorTracking(withTelemetry(coreHandler))
withTelemetry— OTLP traces / metrics / logs push when anyOTEL_EXPORTER_OTLP_*endpoint is configured. Also wraps every D1 binding with a Proxy that logsevent: "d1.slow_query"towrangler tail, even without OTLP, so the slow-query story works on a fresh deploy.withUtelsErrorTracking— pushes oneexceptionevent per 5xx response or thrown exception to a utels.dev project. The endpoint, project ID, and ingest token are env-configured.
When to invoke
Use when you're:
- Standing up observability on a new Worker, want OTLP-compatible traces and metrics to any backend (Honeycomb, Grafana Cloud, Tempo, Jaeger collector, …).
- Adding server-side error tracking via utels without changing handler code.
- Investigating a slow query: drop the threshold env var and watch
wrangler tail.