Skip to content

Commit d8471f9

Browse files
committed
[wobs] update tracing docs to include compat date
1 parent 5a1db63 commit d8471f9

File tree

4 files changed

+94
-8
lines changed

4 files changed

+94
-8
lines changed
383 KB
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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-06
7+
---
8+
9+
Enable automatic tracing on your Workers, giving you detailed metadata and timing information for every operation your Worker performs.
10+
11+
![Tracing example](~/assets/images/workers-observability/R2_Screenshot.png)
12+
13+
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:
14+
* Which calls are slowing down my application?
15+
* Which queries to my database take the longest?
16+
* What happened within a request that resulted in an error?
17+
18+
**You can now:**
19+
* View traces alongside your logs in the Workers Observability dashboard
20+
* 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)
21+
* Analyze and query across span attributes (operation type, status, duration, errors)
22+
23+
## To get started, set:
24+
25+
```jsonc
26+
{
27+
"observability": {
28+
"tracing": {
29+
"enabled": true
30+
}
31+
}
32+
}
33+
```
34+
35+
Starting with the compatibility date of [2025-11-19](/workers/configuration/compatibility-flags/#automatic-tracing), the following will also enable tracing **in addition to** logs:
36+
37+
```jsonc
38+
{
39+
"observability": {
40+
"enabled": true
41+
}
42+
}
43+
```
44+
45+
46+
## Want to learn more?
47+
* [Read the announcement](https://blog.cloudflare.com/workers-tracing-now-in-open-beta/)
48+
* [Check out the documentation](/workers/observability/traces/)
49+
50+
51+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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_date: "2025-11-19"
10+
enable_flag: "enable_workers_observability_tracing"
11+
---
12+
13+
This flag will enable [Workers Tracing](/workers/observability/traces/) by default if you have the following configured in your Wrangler configuration file:
14+
15+
```json
16+
{
17+
"observability": {
18+
"enabled": true
19+
}
20+
}
21+
```
22+
23+
24+
You can also explictly turn on automatic tracing without the flag and with older compatibility dates by setting the following:
25+
26+
27+
```json
28+
{
29+
"observability": {
30+
"traces": {
31+
"enabled": true,
32+
}
33+
}
34+
}
35+
```

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,32 @@ 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.
35+
You can configure tracing by setting `observability.traces.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability).
3636

3737
<WranglerConfig>
3838

3939
```json
4040
{
4141
"observability": {
42-
"enabled": true
42+
"traces": {
43+
"enabled": true,
44+
// optional sampling rate (recommended for high-traffic workloads)
45+
"head_sampling_rate": 0.05
46+
}
4347
}
4448
}
4549
```
4650

4751
</WranglerConfig>
4852

49-
You can also configure tracing independently by setting `observability.traces.enabled = true` in your [wrangler configuration file](/workers/wrangler/configuration/#observability).
53+
Starting with the [compatibility date of 2025-11-19](/workers/configuration/compatibility-flags/#automatic-tracing), the following will also enable tracing **in addition to** logs.
5054

5155
<WranglerConfig>
5256

5357
```json
5458
{
5559
"observability": {
56-
"traces": {
57-
"enabled": true,
58-
// optional sampling rate (recommended for high-traffic workloads)
59-
"head_sampling_rate": 0.05
60-
}
60+
"enabled": true
6161
}
6262
}
6363
```

0 commit comments

Comments
 (0)