cloudflare-workers-otel-utels

Wrap Cloudflare Workers fetch handlers to emit OTLP traces, metrics, and logs.

320|3|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/mizchi/skills --skill cloudflare-workers-otel-utels
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-workers-otel-utels
Source: https://github.com/mizchi/skills/tree/main/cloudflare/workers-otel-utels
Command: npx skills add https://github.com/mizchi/skills --skill cloudflare-workers-otel-utels

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Cloudflare Workers often lack built-in observability. This Skill provides wrappers around a Worker's fetch handler to emit OTLP traces, metrics, and logs and to send error events via utels without changing your business logic.

Core Features & Use Cases

  • Lightweight wrappers: withTelemetry and withUtelsErrorTracking integrate with OTLP backends and utels project to collect traces, metrics, logs, and exception events.
  • Non-intrusive instrumentation: wraps D1 query telemetry and related bindings to surface slow queries and performance data without modifying application code.
  • Use Case: you stand up a new Worker and want end-to-end visibility from request to response, with automated error reporting.

Quick Start

Wrap your worker's fetch handler with withTelemetry and withUtelsErrorTracking to enable OTLP telemetry and optional utels error tracking with minimal code changes.

Frequently Asked Questions about cloudflare-workers-otel-utels

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OTLP telemetry to Cloudflare Workers?

You add OTLP telemetry to Cloudflare Workers by wrapping your fetch handler with the withTelemetry wrapper, which automatically emits traces, metrics, and logs to your configured OTLP endpoints without changing core business logic.

Can I track D1 query performance in Cloudflare Workers without modifying application code?

Yes, you can track D1 query performance non-intrusively. The instrumentation wraps D1 query telemetry and related bindings to surface slow queries and performance data without requiring modifications to your application code.

What environment variables do I need to configure for Cloudflare Workers observability?

You need to set OTEL_EXPORTER_OTLP_ENDPOINT or specific traces, metrics, and logs endpoints. If using utels error tracking, you must also configure UTELS_ENDPOINT, UTELS_PROJECT_ID, and UTELS_INGEST_TOKEN.

How do I set up automated error reporting for Cloudflare Workers?

Automated error reporting is set up by wrapping your worker's fetch handler with withUtelsErrorTracking, which sends exception events to a utels project using your configured UTELS_ENDPOINT, UTELS_PROJECT_ID, and UTELS_INGEST_TOKEN.

What is the best way to get end-to-end request visibility in Cloudflare Workers?

The best way to get end-to-end request visibility is using lightweight wrappers like withTelemetry and withUtelsErrorTracking, which integrate with OTLP backends to collect traces, metrics, logs, and exception events from request to response.

Does wrapping fetch handlers for observability require changing my worker's business logic?

No, wrapping fetch handlers for observability does not require changing your business logic. The wrappers provide non-intrusive instrumentation around the handler to emit telemetry and track errors without altering the core code.