Skip to content

Commit 155804a

Browse files
[wobs] update tracing docs to include compat date (#26298)
* [wobs] update tracing docs to include compat date * Removes default on date --------- Co-authored-by: Mike Nomitch <[email protected]>
1 parent a5765f6 commit 155804a

File tree

5 files changed

+92
-17
lines changed

5 files changed

+92
-17
lines changed
383 KB
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Workers automatic tracing, now in open beta
3+
description: Gain instant visibility into Workers execution with automatic tracing and OpenTelemetry exports
4+
products:
5+
- workers
6+
date: 2025-11-07
7+
---
8+
9+
import { Render } from "~/components";
10+
11+
Enable automatic tracing on your Workers, giving you detailed metadata and timing information for every operation your Worker performs.
12+
13+
![Tracing example](~/assets/images/workers-observability/R2_Screenshot.png)
14+
15+
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:
16+
17+
- Which calls are slowing down my application?
18+
- Which queries to my database take the longest?
19+
- What happened within a request that resulted in an error?
20+
21+
**You can now:**
22+
23+
- View traces alongside your logs in the Workers Observability dashboard
24+
- 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)
25+
- Analyze and query across span attributes (operation type, status, duration, errors)
26+
27+
## To get started, set:
28+
29+
```jsonc
30+
{
31+
"observability": {
32+
"tracing": {
33+
"enabled": true,
34+
},
35+
},
36+
}
37+
```
38+
39+
<Render file="tracing-beta-config-note" product="workers" />
40+
41+
## Want to learn more?
42+
43+
- [Read the announcement](https://blog.cloudflare.com/workers-tracing-now-in-open-beta/)
44+
- [Check out the documentation](/workers/observability/traces/)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Automatic tracing"
8+
sort_date: "2025-11-05"
9+
enable_flag: "enable_workers_observability_tracing"
10+
---
11+
12+
This flag will enable [Workers Tracing](/workers/observability/traces/) by default if you have the following configured in your Wrangler configuration file:
13+
14+
```json
15+
{
16+
"observability": {
17+
"enabled": true
18+
}
19+
}
20+
```
21+
22+
You can also explictly turn on automatic tracing without the flag and with older compatibility dates by setting the following:
23+
24+
```json
25+
{
26+
"observability": {
27+
"traces": {
28+
"enabled": true
29+
}
30+
}
31+
}
32+
```

src/content/docs/workers/observability/traces/index.mdx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77
text: Beta
88
---
99

10-
import { WranglerConfig } from "~/components";
10+
import { WranglerConfig, Render } from "~/components";
1111

1212
### What is Workers tracing?
1313

@@ -32,21 +32,7 @@ For a full list of instrumented operations , see the [spans and attributes docum
3232

3333
### How to enable tracing
3434

35-
If you have already set `observability.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability), tracing **and** logs will be automatically enabled.
36-
37-
<WranglerConfig>
38-
39-
```json
40-
{
41-
"observability": {
42-
"enabled": true
43-
}
44-
}
45-
```
46-
47-
</WranglerConfig>
48-
49-
You can also configure tracing independently by setting `observability.traces.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability).
35+
You can configure tracing by setting `observability.traces.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability).
5036

5137
<WranglerConfig>
5238

@@ -64,7 +50,7 @@ You can also configure tracing independently by setting `observability.traces.en
6450

6551
</WranglerConfig>
6652

67-
53+
<Render file="tracing-beta-config-note" product="workers" />
6854

6955
### Exporting OpenTelemetry traces to a 3rd party destination
7056

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
{}
3+
---
4+
5+
:::note
6+
In the future, Cloudflare plans to enable automatic tracing in addition to logs
7+
when you set `observability.enabled = true` in your Wrangler configuration.
8+
9+
While automatic tracing is in early beta, this setting will not enable tracing by default,
10+
and will only enable logs.
11+
12+
An updated [`compatibility_date`](/workers/configuration/compatibility-dates/) will be required for this change to take effect.
13+
:::

0 commit comments

Comments
 (0)