Skip to content

Conversation

techfg
Copy link

@techfg techfg commented Jun 27, 2025

Add a new option LogAdditionalAttrs and deprecates LogExtraAttrs:

  1. Adds LogAdditionalAttrsOptions.IncludeRequestBody to provide control over when request body is consumed and passed to LogAdditionalAttrsOptions.AdditionalAttrs. The default is false (vs. LogExtraAttrs which would always consume the entire body) which could lead to high memory usage even when not needed
  2. Passes LogDetails to LogAdditionalAttrsOptions.AdditionalAttrs which contains the same params as LogExtraAttrs does but supports extending additional details if/when needed to avoid breaking changes moving forward

The approach taken is not a breaking change, however if desired, the implementation can be simplified which would result in a breaking change and a major bump.

Resolves #62

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.

high memory usage when using LogExtraAttrs
1 participant