Enforce size limits in feedback envelope processors
Copied from sentry repo, since the main work to be done is in Relay.
The long-term solution / Follow-up for:
- https://github.com/getsentry/sentry/pull/79326
- https://github.com/getsentry/sentry/issues/76298
Some context: https://github.com/getsentry/sentry/pull/79326#discussion_r1809123258.
TLDR; right now we're truncating feedbacks in Sentry backend if they're too large. The better solution is to drop large feedbacks immediately, in Relay.
Check for message size limits on the envelope schemas, in rust. Add them if they don't exist. Make sure they're <= 4096 chars as specified in the PR above. (For envelopes we prefer to use bytes.)
-
[ ] new feedback (user_report_v2)
-
[ ] legacy feedback (user_report)
-
[ ] Rather than truncate, emit a rejected outcome for Data Category UserReportV2, and return an error for the SDK.
- relates to https://github.com/getsentry/team-replay/issues/477
-
[ ] Clean up the feedback max-size option and truncate logic in the previous PR.
Follow-ups: A separate, smaller size limit could be enforced for spam detection, to save costs. But I wouldn't about it for this issue.