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
IncomingRequestBody falls back to true, not SendDefaultPii
From reviewing #5885 (thanks @ric-oliv) — worth knowing before this issue is picked up.
SendDefaultPii has never gated incoming request bodies. RequestBodyExtractionDispatcher.ExtractPayload switches on RequestSize alone and never reads it, and both call sites — Sentry.AspNetCore's ScopeExtensions.SetBody and AddAspNet's SystemWebRequestEventProcessor — invoke it unconditionally. So MaxRequestBodySize is the only gate today, which is what our docs say as well.
DataCollectionResolver.IncomingRequestBody therefore falls back to true when DataCollection is unconfigured. Had it followed SendDefaultPii, this issue would have silently cost every app that set MaxRequestBodySize without SendDefaultPii its request bodies.
The other three directions do fall back to SendDefaultPii:
OutgoingRequestBody and IncomingResponseBody — faithful, since SentryGraphQLHttpFailedRequestHandler gates sentryRequest.Data and responseContext.Data on it.
OutgoingResponseBody — no consumer today, so nothing to preserve; SendDefaultPii as the conservative default.
So the intended wiring here stands as described: HttpBodies decides whether to collect, MaxRequestBodySize decides how much, and the size limit keeps taking precedence as an integration-level option.
Once #5894 merges there is one more cookie call site to move onto Cookies: SentryTracingMiddleware.TryStartTransaction sets the http.request.header.cookie span attribute from CookieFilter.FilterCookieHeaders, gated on SendDefaultPii.
Activity
linear-code commentedon Jul 22, 2026
NET-765
jamescrosswell commentedon Nov 8, 2026
IncomingRequestBodyfalls back totrue, notSendDefaultPiiFrom reviewing #5885 (thanks @ric-oliv) — worth knowing before this issue is picked up.
SendDefaultPiihas never gated incoming request bodies.RequestBodyExtractionDispatcher.ExtractPayloadswitches onRequestSizealone and never reads it, and both call sites —Sentry.AspNetCore'sScopeExtensions.SetBodyandAddAspNet'sSystemWebRequestEventProcessor— invoke it unconditionally. SoMaxRequestBodySizeis the only gate today, which is what our docs say as well.DataCollectionResolver.IncomingRequestBodytherefore falls back totruewhenDataCollectionis unconfigured. Had it followedSendDefaultPii, this issue would have silently cost every app that setMaxRequestBodySizewithoutSendDefaultPiiits request bodies.The other three directions do fall back to
SendDefaultPii:OutgoingRequestBodyandIncomingResponseBody— faithful, sinceSentryGraphQLHttpFailedRequestHandlergatessentryRequest.DataandresponseContext.Dataon it.OutgoingResponseBody— no consumer today, so nothing to preserve;SendDefaultPiias the conservative default.So the intended wiring here stands as described:
HttpBodiesdecides whether to collect,MaxRequestBodySizedecides how much, and the size limit keeps taking precedence as an integration-level option.ref: fix the IncomingRequestBody legacy fallback and tighten the reso…
ref: add the DataCollection resolver and SendDefaultPii bridge (#5885)
jamescrosswell commentedon Nov 10, 2026
Once #5894 merges there is one more cookie call site to move onto
Cookies:SentryTracingMiddleware.TryStartTransactionsets thehttp.request.header.cookiespan attribute fromCookieFilter.FilterCookieHeaders, gated onSendDefaultPii.