Skip to content

UF Backend: Limit feedback message size #76298

@aliu39

Description

@aliu39

We discovered in SENTRY-3B86 feedback msgs above a certain size causes errors in the backend. This issue is in spam detection, but looking at a sample trace: this also causes errors writing to Kafka and Postgres (post process job).

Brainstorm:
A good start for what the limit should be is text-bison's max input token limit of 8192. (AI model we're using for spam) https://ai.google.dev/palm_docs/palm#model-metadata.
We need to check the size limits for kafka (think it's ~10kb) and postgres too.

We'd prefer to set limits upstream. There are multiple creation sources (see https://develop.sentry.dev/application/feedback-architecture/), so let's define an option for this msg size limit.

The places to truncate msgs are:

  • Relay: user_report and user_report_v2 envelopes (use #annotated on fields)
  • Sentry backend: user report endpoint and crash report embed form

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions