feat: Add applicationKey option to identify application code from within the SDK#540
Merged
feat: Add applicationKey option to identify application code from within the SDK#540
applicationKey option to identify application code from within the SDK#540Conversation
timfish
approved these changes
May 31, 2024
lforst
commented
May 31, 2024
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; |
Author
There was a problem hiding this comment.
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
Lms24
approved these changes
May 31, 2024
This was referenced Aug 28, 2024
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.
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.