Workers Observability can export a Worker's traces and logs over OTLP. Create two destinations in the Cloudflare dashboard, name them in your Wrangler config, and every invocation reaches Maple. The runtime records the spans, so no code changes.
# Cloudflare dashboard: Workers & Pages > Observability > Destinations
Destination name: maple-traces
Destination type: Traces
OTLP endpoint: https://ingest.maple.dev/v1/traces
Custom headers: Authorization: Bearer YOUR_INGEST_KEY
Destination name: maple-logs
Destination type: Logs
OTLP endpoint: https://ingest.maple.dev/v1/logs
Custom headers: Authorization: Bearer YOUR_INGEST_KEY // wrangler.jsonc
{
"observability": {
"traces": {
"enabled": true,
"destinations": ["maple-traces"],
},
"logs": {
"enabled": true,
"destinations": ["maple-logs"],
},
},
} wrangler deploy This is the short path. The full Cloudflare Workers guide covers the rest.
Organization in the EU region? Send to https://ingest.eu.maple.dev instead of https://ingest.maple.dev. An ingest key only works in its own region.
What you get
One root span per fetch, scheduled or queue invocation, named after the Worker script.
Each subrequest is a child span with its timing and status code.
KV and R2 operations and Durable Object calls, RPC included, nest under the handler span.
console.log, console.error and the invocation log for each request arrive as logs from the same invocation.
Maple reads the Cloudflare attributes on a span and shows the script, version, CPU and wall time, edge location and Ray ID.
Destinations export no metrics. Connect the Cloudflare integration for request counts, error rates and CPU time.
OTLP export is not available on Workers Free, and Cloudflare bills exported events past its allowance. head_sampling_rate: 0.1 records one invocation in ten.
Cloudflare does not yet propagate trace context to services outside Cloudflare. A backend the Worker calls starts its own trace.
The runtime only advances the clock on I/O. CPU work between two I/O calls reports no duration.
SDK를 추가하고 OTLP 익스포터를 Maple로 향하게 하면 트레이스가 도착합니다.
maple.dev: OpenTelemetry 위의 옵저버빌리티