feat(core): Expose MAX_EVENT_SIZE_BYTES constant in SentryOptions#4962
Merged
adinauer merged 6 commits intogetsentry:mainfrom Dec 18, 2025
Merged
feat(core): Expose MAX_EVENT_SIZE_BYTES constant in SentryOptions#4962adinauer merged 6 commits intogetsentry:mainfrom
adinauer merged 6 commits intogetsentry:mainfrom
Conversation
adinauer
approved these changes
Dec 16, 2025
Member
adinauer
left a comment
There was a problem hiding this comment.
Thanks for the PR, added a changelog entry and generated API file
Contributor
Author
|
Thank you @adinauer , any idea what version this will be released as? |
Member
|
Most likely |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Exposed the
MAX_EVENT_SIZE_BYTESconstant as a public field inSentryOptionsto allow SDK consumers to access the maximum event size limit (1MB). Previously, this constant was private in the internalEventSizeLimitingUtilsclass, making it inaccessible to consumers who need to know the size limit for their own calculations or validations.The constant has been moved from
EventSizeLimitingUtilstoSentryOptionsandEventSizeLimitingUtilsnow references it via static import.💡 Motivation and Context
SDK consumers implementing custom event handling (e.g., in
OnOversizedEventCallback) need access to the maximum event size limit to perform their own size calculations and validations. Without this constant being publicly accessible, consumers would have to hardcode the value or duplicate it, which is error-prone and breaks if the limit changes.💚 How did you test it?
SentryOptions.MAX_EVENT_SIZE_BYTESis accessible from external codeEventSizeLimitingUtilscontinues to work correctly with the constant reference📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
OnOversizedEventCallbackimplementations