-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Add dropEvent
options to moduleMetadataIntegration
#11718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
size-limit report 📦
|
enableSend: true, | ||
stackParser, | ||
integrations: [ | ||
moduleMetadataIntegration({ dropEvent: { ifNoStackFrameMetadataMatches: m => m?.team === 'backend' } }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moduleMetadataIntegration({ dropEvent: { ifNoStackFrameMetadataMatches: m => m?.team === 'backend' } }), | |
moduleMetadataIntegration({ dropEvent: { ifNoStackFrameMetadataMatches: m => m.team === 'backend' } }), |
or can m
be undefined here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the types to reflect that the parameter can be undefined. This allows users to filter on whether the metadata for a frame is defined!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am gonna leave a "request changes" here because I would like to still dwell a bit on the exact API here. I think in general I would like this entire functionality to be a completely separate integration with a separate option in the bundler plugins. That would make the documentation and reasoning a tiny bit easier.
Yep, no problem. Would this flag still be stored under the same Any preferences over the integration name and corresponding bundler plugin option? |
Under the hood I think it would still make use of
The following names come to mind for the integration (happy to receive other suggestions):
I think the option in the bundler plugins should be called something like:
The options of the integration should probably be something as follows:
We can also add some more behaviours that only look at the top stack frame. |
This additional option can be used to drop events that don't match specific module metadata on any stack frames: