Skip to content

Commit b9f5829

Browse files
committed
Enhance OpenTelemetry configuration documentation
- Added `head_sampling_rate` and `persist` options for traces and logs in the OpenTelemetry configuration example. - Improved clarity in the tracing documentation regarding default sampling rates and configuration options.
1 parent 7336a37 commit b9f5829

File tree

2 files changed

+11
-3
lines changed
  • src/content/docs/workers/observability

2 files changed

+11
-3
lines changed

src/content/docs/workers/observability/exporting-opentelemetry-data/index.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,21 @@ After setting up destinations in the dashboard, configure your Worker to export
6464
"traces": {
6565
"enabled": true,
6666
"destinations": ["tracing-destination-name"],
67+
6768
// traces sample rate of 5%
6869
"head_sampling_rate": 0.05
70+
71+
//traces not sent to the Cloudflare Dashboard
72+
"persist": false
6973
},
7074
"logs": {
7175
"enabled": true,
7276
"destinations": ["logs-destination-name"],
7377
// logs sample rate of 60%
74-
"head_sampling_rate": 0.6
78+
"head_sampling_rate": 0.6,
79+
80+
//traces not sent to the Cloudflare Dashboard
81+
"persist": false
7582
}
7683
}
7784
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ You can also configure tracing independently by setting `observability.traces.en
6464

6565
</WranglerConfig>
6666

67+
68+
6769
### Exporting OpenTelemetry traces to a 3rd party destination
6870

6971
Workers tracing follows [OpenTelemetry (OTel) standards](https://opentelemetry.io/). This makes it compatible with popular observability platforms,
@@ -76,8 +78,7 @@ Learn more about exporting OpenTelemetry data from Workers [here](/workers/obser
7678

7779
:::note[Default Sampling Rate]
7880

79-
The default sampling rate is `1`, meaning 100% of requests will be traced if tracing is enabled. Set `head_sampling_rate` if
80-
you want to trace fewer requests.
81+
The default sampling rate is `1`, meaning 100% of requests will be traced if tracing is enabled. Set `head_sampling_rate` if you want to trace fewer requests.
8182

8283
:::
8384

0 commit comments

Comments
 (0)