Skip to content

Conversation

nevikashah
Copy link
Contributor

Summary

-draft PR for tracing / exporting OTel docs

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@github-actions github-actions bot added product:workers Related to Workers product size/l labels Aug 26, 2025
@nevikashah nevikashah changed the title Nevi/tracing [DRAFT] Workers Tracing / Exporting OTel Aug 26, 2025
Copy link
Contributor

github-actions bot commented Aug 26, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/assets/images/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/workers/observability/ @irvinebroque, @mikenomitch, @rohinlohe, @kodster28, @cloudflare/pcx-technical-writing

Copy link
Contributor

github-actions bot commented Aug 26, 2025

Preview URL: https://179131de.preview.developers.cloudflare.com
Preview Branch URL: https://nevi-tracing.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers/observability/traces/spans-and-attributes/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/traces/spans-and-attributes/
https://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/
https://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/honeycomb/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/honeycomb/
https://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/axiom/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/axiom/
https://developers.cloudflare.com/workers/observability/traces/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/traces/
https://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/grafana-cloud/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/grafana-cloud/
https://developers.cloudflare.com/workers/observability/query-builder/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/query-builder/
https://developers.cloudflare.com/workers/observability/third-party-integrations/ https://nevi-tracing.preview.developers.cloudflare.com/workers/observability/third-party-integrations/

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm once TODOs are resolved. thanks @nevikashah


Cloudflare has automatically instrumented fetch calls and requests to Cloudflare resources (e.g. Workers KV, D1 Databases, Durable Objects) bound to your Workers application, without requiring you to install and configure an OpenTelemetry SDK.

**TO-DO:** add defintions to each span and attribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very important! Thank you in advance for filling in the docs.

Workers tracing is currently in open beta. This page documents current limitations and any features on our roadmap. To provide more feedback and feature requests please [reach out to us](link).

### Support for more spans and attributes
We are adding more automatic instrumentation for every part of the Workers platform. While we first want to give you visibility into the duration of every operation w ithin your request, we also want to add more detailed attributes which are crucial to debugging your app. You can find a complete list of what is already instrumented [here](link). Your feedback on what’s missing will be extremely valuable [here](link).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We are adding more automatic instrumentation for every part of the Workers platform. While we first want to give you visibility into the duration of every operation w ithin your request, we also want to add more detailed attributes which are crucial to debugging your app. You can find a complete list of what is already instrumented [here](link). Your feedback on what’s missing will be extremely valuable [here](link).
We are adding more automatic instrumentation for every part of the Workers platform. While we first want to give you visibility into the duration of every operation within your request, we also want to add more detailed attributes which are crucial to debugging your app. You can find a complete list of what is already instrumented [here](link). Your feedback on what’s missing will be extremely valuable [here](link).

```

### Exporting OpenTelemetry traces to a 3rd party destination
You can also export [OpenTelemetry](https://opentelemetry.io/) (OTel) traces to a 3rd party destination such as Honeycomb by [setting up an external destination](/workers/observability/exporting-opentelemetry-data) in the Cloudflare dashboard and setting that destination in your Wrangler configuration file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can also export [OpenTelemetry](https://opentelemetry.io/) (OTel) traces to a 3rd party destination such as Honeycomb by [setting up an external destination](/workers/observability/exporting-opentelemetry-data) in the Cloudflare dashboard and setting that destination in your Wrangler configuration file.
You can also export [OpenTelemetry](https://opentelemetry.io/) (OTel) traces to a 3rd party destination such as Honeycomb by [setting up an external destination](/workers/observability/exporting-opentelemetry-data) in the Cloudflare dashboard and setting that destination in your Wrangler configuration file.

### Support for more spans and attributes
We are adding more automatic instrumentation for every part of the Workers platform. While we first want to give you visibility into the duration of every operation w ithin your request, we also want to add more detailed attributes which are crucial to debugging your app. You can find a complete list of what is already instrumented [here](link). Your feedback on what’s missing will be extremely valuable [here](link).

### Trace context propagation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's unclear what the limitation is here. can you be more explicit please?

…I attributes for various handlers, including fetch, cache, D1, R2, and Durable Objects. This update improves clarity on available metrics and attributes for better monitoring and tracing.
…ion by updating section headers and adding links to runtime APIs. This includes restructuring attributes for spans and handlers, improving navigation for users seeking information on metrics and tracing capabilities.
… context propagation and clarify current limitations. Enhance the spans and attributes section with detailed descriptions and examples, ensuring users have comprehensive information on automatic tracing instrumentation and supported attributes.
… including prerequisites, setup steps, and configuration examples for both `wrangler.jsonc` and `wrangler.toml`. This enhances the observability documentation by providing users with clear instructions on integrating Cloudflare Workers with Grafana Cloud for telemetry data visualization and analysis.
…components with `WranglerConfig` for improved clarity and consistency in presenting configuration examples. This update streamlines the guide for exporting OpenTelemetry data to Grafana Cloud, ensuring users have a unified format for configuration across different sections.
…y data delivery status and sampling configurations. This includes refining status descriptions, enhancing troubleshooting guidance, and clarifying the default sampling behavior. Additionally, the known limitations section has been updated to reflect upcoming features and improvements in trace context propagation and automatic instrumentation.
…y data export links and improve the descriptions of spans and attributes. This includes correcting links for exporting OpenTelemetry data, refining the section on missing instrumentation, and updating references to the Durable Object Storage SQL and KV APIs for better user guidance.
…nTelemetry data and refine references to Durable Object Storage APIs. This includes updating the link for the SQL API and the KV API, as well as improving the clarity of the known limitations section by removing unnecessary phrasing. These changes enhance user guidance and ensure accurate navigation within the documentation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this leaking Issues as a feature?

### Support for custom spans and attributes:
While automatic instrumentation covers the platform interactions, we know you need visibility into your own application logic too. We're working to support the [OpenTelemetry API](https://www.npmjs.com/package/@opentelemetry/api) to make it easier for you to instrument custom spans within your application.

### No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a section here explaining Missing Root Spans/Trace in progress so I can link to it from the UI?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a different section? That isn't a known limitation so much as "how tracing works"

Copy link

@ishanjainn ishanjainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor updates on the steps to extract Auth headers

… OpenTelemetry destinations, including common OTLP endpoint formats for various providers. Update Grafana Cloud setup instructions for clarity and include a new section on known limitations regarding metrics export and OTLP support. Additionally, refine the spans and attributes section to indicate that names may change during the beta period, ensuring users are informed of potential updates.
…, including prerequisites, API key configuration, and step-by-step instructions for setting up trace and logs destinations in the Cloudflare dashboard. Update Worker configuration example using `WranglerConfig` for clarity. Additionally, enhance the known limitations section with a new call-out for user awareness.
…ormats for Grafana Cloud, Axiom, Datadog, and Sentry. Enhance the known limitations section with additional details on metadata applicability across spans and logs, ensuring users are better informed about current bugs and trace visibility.
…traces documentation for improved clarity on KV Namespace and R2 bucket calls.
…sualization of trace data. This enhances user understanding of the observability features available in Cloudflare Workers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants