Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Setting maxEntrySize does not truncate big json payloads correctly #1087

@leononame

Description

@leononame

When setting maxEntrySize for a logger and using jsonPayload, the truncation algorithm does not truncate all fields, but rather only a very small set of fields: https://github.com/googleapis/nodejs-logging/blob/master/src/log.ts#L984

As a user, when passing maxEntrySize, I expect it to also truncate custom fields. In our case, one of our fields is a huge list of UUIDs that does not matter if it gets truncated a little, but should be there. However, it does not get truncated and in the end we get exceptions thrown in prod because our log entries are too big.

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/nodejs-logging API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions