From 70f5d86c6dd9a81884aa20922e91b4ff6634c70b Mon Sep 17 00:00:00 2001 From: Rohin Lohe Date: Thu, 3 Apr 2025 10:18:33 -0700 Subject: [PATCH 1/2] [workers-observability] changelog: increase workers trace events limit to 256 KB --- .../2025-04-07-increase-trace-events-limit.mdx | 14 ++++++++++++++ .../workers/observability/logs/workers-logs.mdx | 4 ++-- src/content/docs/workers/platform/limits.mdx | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx diff --git a/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx b/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx new file mode 100644 index 000000000000000..25e697a60367df7 --- /dev/null +++ b/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx @@ -0,0 +1,14 @@ +--- +title: Workers increases maximum log events per invocation to 256 KB +description: Workers increases maximum log events per invocation to 256 KB +products: + - workers +date: 2025-04-07T00:00:00Z +--- + +You can now capture a maximum of 256 KB of log events per Workers invocation, helping you gain better visiblity into application behavior. + +256 KB encompasses console.log() statements, exceptions, request metadata, and headers to the console per invocation. This is a 2x increase +from the previous 128 KB limit. After you exceed this limit, further context associated with the request will not be recorded in your logs. + +This limit is automatically applied to all Workers. diff --git a/src/content/docs/workers/observability/logs/workers-logs.mdx b/src/content/docs/workers/observability/logs/workers-logs.mdx index 5f7abbb6740d36a..303ae23f5175663 100644 --- a/src/content/docs/workers/observability/logs/workers-logs.mdx +++ b/src/content/docs/workers/observability/logs/workers-logs.mdx @@ -191,11 +191,11 @@ head_sampling_rate = 0.01 # 1% sampling rate | ------------------------------------------------------------------ | ---------- | | Maximum log retention period | 7 Days | | Maximum logs per account per day1 | 5 Billion | -| Maximum log size2 | 128 KB | +| Maximum log size2 | 256 KB | 1 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. -2 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. +2 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. ## Pricing diff --git a/src/content/docs/workers/platform/limits.mdx b/src/content/docs/workers/platform/limits.mdx index 63b5fb897ba0738..7a775949e482daf 100644 --- a/src/content/docs/workers/platform/limits.mdx +++ b/src/content/docs/workers/platform/limits.mdx @@ -312,7 +312,7 @@ When using Image Resizing with Workers, refer to [Image Resizing documentation]( ## Log size -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/). +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/). 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. From dc3fed45b77f6bb8d4c2b6d5752d7290d5155f4c Mon Sep 17 00:00:00 2001 From: Rohin Lohe Date: Sun, 6 Apr 2025 19:48:59 -0700 Subject: [PATCH 2/2] [workers-observability] changelog: reference workers logs --- .../2025-04-07-increase-trace-events-limit.mdx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx b/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx index 25e697a60367df7..5914d8679a55519 100644 --- a/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx +++ b/src/content/changelog/workers/2025-04-07-increase-trace-events-limit.mdx @@ -1,6 +1,6 @@ --- -title: Workers increases maximum log events per invocation to 256 KB -description: Workers increases maximum log events per invocation to 256 KB +title: Capture up to 256 KB of log events in each Workers Invocation +description: You can now capture up to 256 KB of log events per Workers Invocation helping you gain better visibility into application behavior. products: - workers date: 2025-04-07T00:00:00Z @@ -8,7 +8,12 @@ date: 2025-04-07T00:00:00Z You can now capture a maximum of 256 KB of log events per Workers invocation, helping you gain better visiblity into application behavior. -256 KB encompasses console.log() statements, exceptions, request metadata, and headers to the console per invocation. This is a 2x increase -from the previous 128 KB limit. After you exceed this limit, further context associated with the request will not be recorded in your logs. +All console.log() statements, exceptions, request metadata, and headers are automatically captured during the Worker invocation and emitted +as [JSON object](/logs/reference/log-fields/account/workers_trace_events). [Workers Logs](/workers/observability/logs/workers-logs) deserializes +this object before indexing the fields and storing them. You can also capture, transform, and export the JSON object in a +[Tail Worker](/workers/observability/logs/tail-workers). + +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 + recorded in your logs. This limit is automatically applied to all Workers.