Adjust the logic in
|
def truncate_messages_by_size( |
to always only include the last (newest) message rather than all that fit into the 20kB limit.
All our integrations should use the function linked above already, so changing the logic in it should be all that's necessary (and adjusting the tests).
Context (sorry, Sentry employees only): https://sentry.slack.com/archives/C06KVE7V0DA/p1768578892574999?thread_ts=1768311204.311329&cid=C06KVE7V0DA