getsentry / relay

Sentry event forwarding and ingestion service.
https://docs.sentry.io/product/relay/
Other
319 stars 92 forks source link

fix(replays): Run TrimmingProcessor on replays #3706

Closed iker-barriocanal closed 3 months ago

iker-barriocanal commented 3 months ago

Although some fields in replays have max_chars defined, the trimming processor isn't run and thus the limit is not enforced. This PR runs the processor and enforces that limit.

iker-barriocanal commented 3 months ago

The max length is defined by the annotation on the fields correct?

Yep, that's correct.

Does this mean string trimming wasn't working before?

Yes, let me know if I should clarify further the PR description.

test only stresses dist, should it test the other fields too?

The test validates that the trimming processor runs on replays, and there are separate tests to validate that the trimming processor trims fields with max_chars, so it's ok to move forward with the current state. We can add more tests if there are known edge cases.