Skip to content

Commit 556742f

Browse files
authored
[workers-observability] changelog: increase workers trace events limit to 256 KB (#21376)
* [workers-observability] changelog: increase workers trace events limit to 256 KB * [workers-observability] changelog: reference workers logs --------- Co-authored-by: Rohin Lohe <[email protected]>
1 parent b0f48e0 commit 556742f

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Capture up to 256 KB of log events in each Workers Invocation
3+
description: You can now capture up to 256 KB of log events per Workers Invocation helping you gain better visibility into application behavior.
4+
products:
5+
- workers
6+
date: 2025-04-07T00:00:00Z
7+
---
8+
9+
You can now capture a maximum of 256 KB of log events per Workers invocation, helping you gain better visiblity into application behavior.
10+
11+
All console.log() statements, exceptions, request metadata, and headers are automatically captured during the Worker invocation and emitted
12+
as [JSON object](/logs/reference/log-fields/account/workers_trace_events). [Workers Logs](/workers/observability/logs/workers-logs) deserializes
13+
this object before indexing the fields and storing them. You can also capture, transform, and export the JSON object in a
14+
[Tail Worker](/workers/observability/logs/tail-workers).
15+
16+
256 KB is a 2x increase from the previous 128 KB limit. After you exceed this limit, further context associated with the request will not be
17+
recorded in your logs.
18+
19+
This limit is automatically applied to all Workers.

src/content/docs/workers/observability/logs/workers-logs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ head_sampling_rate = 0.01 # 1% sampling rate
191191
| ------------------------------------------------------------------ | ---------- |
192192
| Maximum log retention period | 7 Days |
193193
| Maximum logs per account per day<sup>1</sup> | 5 Billion |
194-
| Maximum log size<sup>2</sup> | 128 KB |
194+
| Maximum log size<sup>2</sup> | 256 KB |
195195

196196
<sup>1</sup> While Workers Logs is in open beta, there is a daily limit of 5 billion logs per account per day. After the limit is exceed, a 1% head-based sample will be applied for the remainder of the day.
197197

198-
<sup>2</sup> A single log has a maximum size limit of [128 KB](/workers/platform/limits/#log-size). Logs exceeding that size will be truncated and the log's `$cloudflare.truncated` field will be set to true.
198+
<sup>2</sup> A single log has a maximum size limit of [256 KB](/workers/platform/limits/#log-size). Logs exceeding that size will be truncated and the log's `$cloudflare.truncated` field will be set to true.
199199

200200
## Pricing
201201

src/content/docs/workers/platform/limits.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ When using Image Resizing with Workers, refer to [Image Resizing documentation](
314314

315315
## Log size
316316

317-
You can emit a maximum of 128 KB of data (across `console.log()` statements, exceptions, request metadata and headers) to the console for a single request. After you exceed this limit, further context associated with the request will not be recorded in logs, appear when tailing logs of your Worker, or within a [Tail Worker](/workers/observability/logs/tail-workers/).
317+
You can emit a maximum of 256 KB of data (across `console.log()` statements, exceptions, request metadata and headers) to the console for a single request. After you exceed this limit, further context associated with the request will not be recorded in logs, appear when tailing logs of your Worker, or within a [Tail Worker](/workers/observability/logs/tail-workers/).
318318

319319
Refer to the [Workers Trace Event Logpush documentation](/workers/observability/logs/logpush/#limits) for information on the maximum size of fields sent to logpush destinations.
320320

0 commit comments

Comments
 (0)