Skip to content
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

feat: Add applicationKey option to identify application code from within the SDK #540

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

lforst
Copy link
Member

@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 timfish and Lms24 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
Member 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 added 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.

3 participants