Skip to content

Conversation

@lforst
Copy link

@lforst lforst commented May 31, 2024

Ties into getsentry/sentry-javascript#12267
Ref getsentry/sentry-javascript#10882

Allows users to mark their bundles with an application key which will allow the SDK to filter events based on application keys in stack frames.

@lforst lforst requested review from Lms24 and timfish May 31, 2024 13:41
Comment on lines 231 to 236
// We use different keys so that if code receives multiple bundling passes.
// It is a bit unfortunate that we have to inject the metadata snippet at the top, which means that if we didn't
// have this mechanism, the first bundling pass would always "win". If this weren't the case we would be fine with
// the last pass winning but the first pass winning is very bad, because it would prevent any sort of overriding.
// We can simply use the `_sentryBundlerPluginAppKey:` to filter for app keys in the SDK.
metadata[`_sentryBundlerPluginAppKey:${options.applicationKey}`] = true;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is sus but I hope the comment makes sense

lforst pushed a commit to getsentry/sentry-javascript that referenced this pull request May 31, 2024
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.

4 participants