Open aliu39 opened 1 month ago
Routing to @getsentry/product-owners-user-feedback for triage ⏲️
We should make sure that front end displays a reasonable error msg as well
We can also set max_length for the comments field of userreport.py But not sure how this would affect the current data, if we need a migration, etc
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:
#annotated
on fields)