From e5b90d1d9a27f731faad96ab2411b14ff077fca2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 09:34:49 +0000 Subject: [PATCH] docs: add max size documentation to guides for PR 359 Agent-Logs-Url: https://github.com/entur/cloud-logging/sessions/74545817-1849-4728-ac34-f3cd25df704f Co-authored-by: skjolber <1031478+skjolber@users.noreply.github.com> --- guides/gRPC.md | 9 +++++++++ guides/troubleShooting.md | 2 +- guides/web.md | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/guides/gRPC.md b/guides/gRPC.md index b8156088..a7d889ac 100644 --- a/guides/gRPC.md +++ b/guides/gRPC.md @@ -163,6 +163,15 @@ testImplementation ("no.entur.logging.cloud:request-response-spring-boot-starter ``` +Please note: + + * GCP `LogEntry` has a hard size limit of 256 KiB. Request/response bodies are truncated at 224 KiB by default to stay safely within this limit, accounting for headers, MDC fields, and other log-framework overhead. Override the default using: + ``` + entur.logging.request-response.max-body-size= + entur.logging.request-response.max-size= + ``` + See also: [Too long lines](troubleShooting.md#too-long-lines). + Adjust the logger using ``` diff --git a/guides/troubleShooting.md b/guides/troubleShooting.md index 8f2404dc..cb0ac73f 100644 --- a/guides/troubleShooting.md +++ b/guides/troubleShooting.md @@ -136,4 +136,4 @@ Does not always translate into `textPayload`. > Failed to process request with tag kube_abt-xxx_abt-ccc-79d5974b67-jdsk8_abt-ccc_stdout: rpc error: code = InvalidArgument desc = Log entry with size 278.8K exceeds maximum size of 256.0K -Resolution: Truncate long values. \ No newline at end of file +Resolution: Truncate long values. For request-response logging, the library automatically truncates request/response bodies at 224 KiB by default (GCP `LogEntry` max is 256 KiB). The limit can be lowered further via `entur.logging.request-response.max-body-size`. \ No newline at end of file diff --git a/guides/web.md b/guides/web.md index 2f7f9299..d17c8e35 100644 --- a/guides/web.md +++ b/guides/web.md @@ -130,6 +130,12 @@ Please note: * For request-response-logging, this library assumes that locally produced JSON has valid syntax and is without pretty-printing. * This assumption is made so to avoid the processing overhead of unnecessarily parsing JSON documents known to be valid. * If this assumption for some reason does not hold, use a BodyFilter to compensate. + * GCP `LogEntry` has a hard size limit of 256 KiB. Request/response bodies are truncated at 224 KiB by default to stay safely within this limit, accounting for headers, MDC fields, and other log-framework overhead. Override the default using: + ``` + entur.logging.request-response.max-body-size= + entur.logging.request-response.max-size= + ``` + See also: [Too long lines](troubleShooting.md#too-long-lines). Some Logbook excludes ([actuator, openapi](https://github.com/entur/cloud-logging/blob/main/request-response/logbook-spring-boot-autoconfigure/src/main/java/no/entur/logging/cloud/spring/logbook/LogbookLoggingAutoConfiguration.java)) are included by default. Add more using