Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

The actually useful free plan

Grafana Cloud Free Tier
check

10k series Prometheus metrics

check

50GB logs, 50GB traces, 50GB profiles

check

500VUk k6 testing

check

20+ Enterprise data source plugins

check

100+ pre-built solutions

Featured webinar

Getting started with grafana LGTM stack

Getting started with managing your metrics, logs, and traces using Grafana

Learn how to unify, correlate, and visualize data with dashboards using Grafana.

Send OpenTelemetry traces and logs from Cloudflare Workers to Grafana Cloud

Send OpenTelemetry traces and logs from Cloudflare Workers to Grafana Cloud

2025-12-04 6 min

Note: This blog was co-authored by Nevika Shah, a senior product manager at Cloudflare.

Cloudflare Workers is a developer platform for deploying serverless functions, frontends, containers, and databases to a global network, spanning 330+ cities around the world. However, as your application scales, it becomes crucial to have the right observability tools to investigate issues, monitor performance, and get alerts when issues arise.

Last month, Cloudflare Workers announced support for exporting OpenTelemetry logs and traces, letting you send this data directly to Grafana Cloud. By adopting the OpenTelemetry Protocol (OTLP) as the transport layer and exposing an easy configuration workflow in both platforms, you can stream traces and logs from your Workers application directly to your Grafana Cloud stack. 

The new Cloudflare Workers integration for Grafana Cloud offers pre-built dashboards, allowing you to quickly visualize and get value from your data. This includes the ability to drill down into traces and logs based on attributes like request location and duration. By sending data to Grafana Cloud, you can use: 

Traces, logs, and dashboards out of the box

Exporting data from your Workers application uses a push‑based pipeline that forwards telemetry directly to Grafana Cloud using Cloudflare’s built-in Workers Observability feature called Destinations. Just add your OpenTelemetry endpoint and start sending — no agent installation and no sidecar management. 

Once configured, you can automatically investigate:

  • Traces: OpenTelemetry spans are automatically instrumented within the Workers runtime. Spans like subrequests to APIs and calls to Worker bindings like R2 Object Storage and Workers Key-Value Store are automatically emitted and ingested by Tempo. 
  • Logs: Logs emitted by your Workers are forwarded to Loki and indexed for search and alerting.
  • Pre‑built dashboards: Grafana Cloud provides ready‑made panels tailored to Cloudflare Workers telemetry, letting you see request volumes, latency distributions, error rates, and geographical patterns without building dashboards from scratch.

Multiple Workers can send data to the same Grafana Cloud stack, and the pipeline scales automatically; there is no infrastructure to provision or maintain.

Practical scenarios

Let’s look at a few scenarios where this data is used to diagnose and manage application health: 

  • Debugging performance in specific regions: If users in Europe report slowness, filter the dashboard to those colos and examine latency distributions. You can use Tempo to follow slow traces step by step, and Loki to see whether errors or long‑running operations correlate. Because telemetry is global, you can compare the European pattern to other continents to isolate the issue.
  • Capacity and traffic planning: By watching request volume trends across continents and time zones, you can anticipate growth and adjust caching or compute limits accordingly. 
  • Security and anomaly detection: Sudden spikes from unusual HTTP methods or from unexpected countries may indicate abuse. The integration’s real‑time metrics and logs help you identify these anomalies quickly and initiate mitigations.
  • User experience optimization: Client analytics reveal which browsers, OSes, or devices dominate your traffic. If you see poor performance for a particular browser version, you can reproduce and fix it. Language and locale information can inform localization decisions or A/B testing.

Get set up 

At a high level, the integration consists of two pieces: 

  • Destination set-up in your Cloudflare dashboard that points at your Grafana Cloud OTLP endpoint
  • A small snippet of configuration for your Worker, telling Cloudflare to send traces and logs to Grafana Cloud

Configure OTLP destinations

  1. Create a Grafana Cloud access policy token in your Grafana portal. When you add a new OTLP connection, Grafana will display an OTLP endpoint (such as https://otlp-gateway-prod-us-east-2.grafana.net/otlp) and a header name/value pair for authentication. The header name is Authorization, and the value is a Base64‑encoded token beginning with Basic …
  2. Add destinations in Cloudflare Workers Observability. In your Cloudflare dashboard, go to the Workers Observability page and add two destinations: one for traces and one for logs. For each, provide the Grafana OTLP endpoint with the appropriate suffix (/v1/traces or /v1/logs), and supply the Authorization header and its value from the previous step.
A screenshot of the 'Add New Destination' UI with Traces selected as the destination type.

Enable observability on your Worker

Next, configure your Worker to emit telemetry. You can do this by editing your Wrangler configuration file

[observability.traces]
enabled = true
destinations = ["grafana-traces"]

[observability.logs]
enabled = true
destinations = ["grafana-logs"]

The destination names must match the names you configured in the Cloudflare dashboard. After deployment, data will begin sending to Grafana Cloud.

Inside the pre-built dashboards

A screenshot of a Grafana Cloud dashboard for Cloudflare Workers, showing metrics including total numbers of events, request rate, and unique countries.

Once telemetry reaches Grafana, the pre‑built dashboard surfaces a rich set of insights:

Request patterns and performance

Grafana Cloud charts total request counts, requests per second, and unique requests (based on Ray IDs) so you can spot spikes or drops in traffic. Time‑series panels compare latency metrics across methods and endpoints and show the distribution of HTTP methods (GET, POST, etc.), while bar charts visualize the most frequently accessed URL paths. You can click into an error trace and immediately view the associated log messages. 

Geographic distribution

Edge‑native applications serve users all over the world, so geography matters. The dashboard includes a geomap heatmap that highlights countries by request volume. You can drill down to see which Cloudflare data centers handle the most traffic and analyze patterns by continent, time zone, region, or even by autonomous system number (ASN). These views help identify high‑latency regions or unusual traffic sources.

Client environment

Understanding the devices and software hitting your Worker can help prioritize testing and optimization. The integration enriches logs with user‑agent details, letting you break down requests by browser family (Chrome, Firefox, Safari, Edge), operating system (Windows, macOS, Linux, iOS, Android), rendering engine, and even user‑preferred language. You can compare performance across these dimensions to detect regressions or device‑specific issues.

Execution context and protocols

The dashboards also show which handlers were invoked on your Worker, such as HTTP requests, cron events, and queue consumers. Combined with latency graphs, these metrics make it easier to investigate Worker latency by handler type. 

A Grafana Cloud logs panel for Cloudflare Workers showing a table of trace IDs and start times, and a selected trace detail panel with span timeline.

Loki indexes all logs from your Worker and surfaces severity trends in the dashboard. Bar charts split counts of info, warning, and error messages over time. Anomalies (e.g., a sudden increase in error logs from a specific region) can trigger alerts, and because each log entry includes a trace ID, you can jump from a log line directly to the related trace in Tempo.

Want to learn more? 

To dive deeper into the tools and standards behind this integration, you can explore the following resources:

  • Cloudflare Workers integration documentation: Find detailed instructions for installing and configuring the integration
  • Cloudflare’s export guide: Get step‑by‑step guidance for exporting telemetry to Grafana Cloud and other OTLP destinations
  • OpenTelemetry specification: Learn how OTLP standardizes telemetry across vendors
  • Tempo and Loki: Explore how Grafana’s tracing and logging backends work.

Grafana Cloud is the easiest way to get started with metrics, logs, traces, dashboards, and more. We have a generous forever-free tier and plans for every use case. Sign up for free now!