feat: Update requestDataIntegration
handling
#14806
Draft
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.
This PR cleans up the behavior of
requestDataIntegration
. For this, there are a bunch of parts that come together:request.user
and infer a user to put on the event from it. This is a non-standard property, that is sometimes set by some express middleware. It is not documented anywhere. Additionally, this is thus also not available at request-start-time, only later (as middleware may set this later on the request), meaning we'd need to somehow pick this off later. We decided to instead remove this behavior -requestDataIntegration
will no longer set a user on the event. The respectiveinclude
config is also gone from it. Instead, if you want this, you'll need to callSentry.setUser()
yourself in some middleware. Also note that this actually aligns more closely with what we'd expect, which is that by default no user is set on Sentry events (privacy by default).@sentry/utils
and@sentry/core
. Now, this is all in core, so we can remove all the related imports. We'll need to backport these missing deprecations to the v8 branch, this includes e.g.DEFAULT_USER_INCLUDES
oraddNormalizedRequestDataToEvent
.scope.setSDKProcessingMetadata()
are now better shaped, so that for specific things it enforces a concrete shape.requestDataIntegration
code. I also colocated the specific stuff into the integration.TODO: Migration docs
Closes #14297