diff --git a/src/assets/images/workers-observability/R2_Screenshot.png b/src/assets/images/workers-observability/R2_Screenshot.png new file mode 100644 index 000000000000000..b8eeb988518fa14 Binary files /dev/null and b/src/assets/images/workers-observability/R2_Screenshot.png differ diff --git a/src/content/changelog/workers/2025-11-07-automatic-tracing.mdx b/src/content/changelog/workers/2025-11-07-automatic-tracing.mdx new file mode 100644 index 000000000000000..831fd0733dc8a26 --- /dev/null +++ b/src/content/changelog/workers/2025-11-07-automatic-tracing.mdx @@ -0,0 +1,44 @@ +--- +title: Workers automatic tracing, now in open beta +description: Gain instant visibility into Workers execution with automatic tracing and OpenTelemetry exports +products: + - workers +date: 2025-11-07 +--- + +import { Render } from "~/components"; + +Enable automatic tracing on your Workers, giving you detailed metadata and timing information for every operation your Worker performs. + +![Tracing example](~/assets/images/workers-observability/R2_Screenshot.png) + +Tracing helps you identify performance bottlenecks, resolve errors, and understand how your Worker interacts with other services on the Workers platform. You can now answer questions like: + +- Which calls are slowing down my application? +- Which queries to my database take the longest? +- What happened within a request that resulted in an error? + +**You can now:** + +- View traces alongside your logs in the Workers Observability dashboard +- Export traces (and correlated logs) to any [OTLP-compatible destination](https://opentelemetry.io/docs/specs/otel/protocol/), such as [Honeycomb](/workers/observability/exporting-opentelemetry-data/honeycomb/), [Sentry](/workers/observability/exporting-opentelemetry-data/sentry/) or [Grafana](/workers/observability/exporting-opentelemetry-data/grafana-cloud/), by configuring a tracing destination in the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers-and-pages/observability/destinations) +- Analyze and query across span attributes (operation type, status, duration, errors) + +## To get started, set: + +```jsonc +{ + "observability": { + "tracing": { + "enabled": true, + }, + }, +} +``` + + + +## Want to learn more? + +- [Read the announcement](https://blog.cloudflare.com/workers-tracing-now-in-open-beta/) +- [Check out the documentation](/workers/observability/traces/) diff --git a/src/content/compatibility-flags/automatic-tracing.md b/src/content/compatibility-flags/automatic-tracing.md new file mode 100644 index 000000000000000..fe7d267f3c4c204 --- /dev/null +++ b/src/content/compatibility-flags/automatic-tracing.md @@ -0,0 +1,32 @@ +--- +_build: + publishResources: false + render: never + list: never + +name: "Automatic tracing" +sort_date: "2025-11-05" +enable_flag: "enable_workers_observability_tracing" +--- + +This flag will enable [Workers Tracing](/workers/observability/traces/) by default if you have the following configured in your Wrangler configuration file: + +```json +{ + "observability": { + "enabled": true + } +} +``` + +You can also explictly turn on automatic tracing without the flag and with older compatibility dates by setting the following: + +```json +{ + "observability": { + "traces": { + "enabled": true + } + } +} +``` diff --git a/src/content/docs/workers/observability/traces/index.mdx b/src/content/docs/workers/observability/traces/index.mdx index 08c56adedd5064a..f796d9e87ddc586 100644 --- a/src/content/docs/workers/observability/traces/index.mdx +++ b/src/content/docs/workers/observability/traces/index.mdx @@ -7,7 +7,7 @@ sidebar: text: Beta --- -import { WranglerConfig } from "~/components"; +import { WranglerConfig, Render } from "~/components"; ### What is Workers tracing? @@ -32,21 +32,7 @@ For a full list of instrumented operations , see the [spans and attributes docum ### How to enable tracing -If you have already set `observability.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability), tracing **and** logs will be automatically enabled. - - - -```json -{ - "observability": { - "enabled": true - } -} -``` - - - -You can also configure tracing independently by setting `observability.traces.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability). +You can configure tracing by setting `observability.traces.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability). @@ -64,7 +50,7 @@ You can also configure tracing independently by setting `observability.traces.en - + ### Exporting OpenTelemetry traces to a 3rd party destination diff --git a/src/content/partials/workers/tracing-beta-config-note.mdx b/src/content/partials/workers/tracing-beta-config-note.mdx new file mode 100644 index 000000000000000..094d91d53298d90 --- /dev/null +++ b/src/content/partials/workers/tracing-beta-config-note.mdx @@ -0,0 +1,13 @@ +--- +{} +--- + +:::note +In the future, Cloudflare plans to enable automatic tracing in addition to logs +when you set `observability.enabled = true` in your Wrangler configuration. + +While automatic tracing is in early beta, this setting will not enable tracing by default, +and will only enable logs. + +An updated [`compatibility_date`](/workers/configuration/compatibility-dates/) will be required for this change to take effect. +:::