Skip to content

Add Configurable Maximum Length for Serialized Log Values - #690

Open
Damilorlar wants to merge 4 commits into
Sub-Rosa-Issue:mainfrom
Damilorlar:feature/issue-667-truncate-logs
Open

Damilorlar wants to merge 4 commits into
Sub-Rosa-Issue:mainfrom
Damilorlar:feature/issue-667-truncate-logs

Conversation

@Damilorlar

Copy link
Copy Markdown
Contributor

#closes #667

Large upstream errors or malformed inputs can produce excessively long log entries, increasing log volume and potentially exposing unnecessary sensitive information.

This project aims to introduce a configurable maximum length for serialized values in the shared logging package. Values exceeding the limit should be truncated with a clear indicator, without retaining or exposing the discarded content.

Acceptance Criteria:
- Add a configurable maximum serialized string length.
- Mark truncated values without including discarded content.
- Apply consistent truncation to nested fields.
- Add tests covering strings, arrays, and error objects.

…ssue Sub-Rosa-Issue#667)

- Add configurable max serialized string length
- Mark truncated values with suffix without including discarded content
- Handle nested fields consistently
- Add tests for strings, arrays, and error objects
…ssue Sub-Rosa-Issue#667)

- Add configurable max serialized string length
- Mark truncated values with suffix without including discarded content
- Handle nested fields consistently
- Add tests for strings, arrays, and error objects
@drips-wave

drips-wave Bot commented Nov 25, 2026

Copy link
Copy Markdown

@Damilorlar Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Damilorlar
Damilorlar force-pushed the feature/issue-667-truncate-logs branch from cc7c9f7 to 3ad1938 Compare November 25, 2026 06:52
Damilorlar and others added 2 commits November 25, 2026 08:17
The branch added a second `test` key and a vitest devDependency to the SDK
package, so `pnpm install --frozen-lockfile` failed before every CI job could
start and the new tests were never executed. Run them on node:test with the
rest of the SDK, correct the assertions, tighten the truncation types, and
extend the public-API snapshot for the two new exports.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

security(high/easy): truncate oversized fields in structured logs

2 participants