feat(core): Add dropEvent options to moduleMetadataIntegration#11718
feat(core): Add dropEvent options to moduleMetadataIntegration#11718
dropEvent options to moduleMetadataIntegration#11718Conversation
size-limit report 📦
|
| enableSend: true, | ||
| stackParser, | ||
| integrations: [ | ||
| moduleMetadataIntegration({ dropEvent: { ifNoStackFrameMetadataMatches: m => m?.team === 'backend' } }), |
There was a problem hiding this comment.
| 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.
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!
lforst
left a comment
There was a problem hiding this comment.
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: