You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, user feedback was sent as a bare event payload carrying no scope data, so it had no trace tying it to errors from the same session, no release, environment, etc, which left Sentry defaulting the environment to production and mislabeling feedback coming from other builds. This PR applies the global scope to the feedback event before it is enveloped, so release, environment, tags, user, and contexts including the trace all come along. Breadcrumbs, modules, stacktraces, and scope attachments are deliberately left off.
It also fixes a pre-existing leak where capturing feedback before the SDK is initialized dropped the feedback value without releasing it.
Scope attachments are excluded from this change. The spec requires scope data, such as tags, user, trace, and contexts, to be included with feedback, but only says attachments MAY be sent. The spec doesn't explicitly forbid scope attachments either. Java/Android doesn't include scope attachments, but .NET and Cocoa do. So it seems that existing implementations drifted on this. Per-feedback attachments remain available via sentry_capture_feedback_with_hint.
❌ Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.64%. Comparing base (b5cd30f) to head (1073ed7).
The reason will be displayed to describe this comment to others. Learn more.
One decision point is whether to include scope attachments in user feedback. Currently, scope attachments are excluded from this change. The spec requires scope data, such as tags, user, trace, and contexts, to be included with feedback, but only says attachments MAY be sent. The spec doesn't explicitly forbid scope attachments either. Java/Android doesn't include scope attachments, but .NET and Cocoa do. So it seems that existing implementations drifted on this. Per-feedback attachments remain available via sentry_capture_feedback_with_hint.
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
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.
Previously, user feedback was sent as a bare event payload carrying no scope data, so it had no trace tying it to errors from the same session, no release, environment, etc, which left Sentry defaulting the environment to
productionand mislabeling feedback coming from other builds. This PR applies the global scope to the feedback event before it is enveloped, so release, environment, tags, user, and contexts including the trace all come along. Breadcrumbs, modules, stacktraces, and scope attachments are deliberately left off.It also fixes a pre-existing leak where capturing feedback before the SDK is initialized dropped the feedback value without releasing it.
Scope attachments are excluded from this change. The spec requires scope data, such as tags, user, trace, and contexts, to be included with feedback, but only says attachments MAY be sent. The spec doesn't explicitly forbid scope attachments either. Java/Android doesn't include scope attachments, but .NET and Cocoa do. So it seems that existing implementations drifted on this. Per-feedback attachments remain available via
sentry_capture_feedback_with_hint.