feat: Preserve full Span.Description #674
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SDKs store potentially lenghty information in the description that is
only useful when complete. In particular, the DB integration in Python
sets the description to a SQL query. Users looking at slow spans want to
be able to read the SQL query as part of understanding why it was slow.
Truncation after 1024 bytes means often times not even the SELECT part
of the query is readable.
While we may consider changing SDKs to send the full query in a
different field and leverage that in the Sentry UI (e.g. syntax
highlighting), the expedient solution to fix the current UX is to remove
the truncation in Relay.
We could alternatively increase the limit, e.g.
#[metastructure(max_chars = "message")]
would allow for 8192 bytes, 8x more than 'summary' at 1024 bytes,
however, that becomes just yet another arbitrary truncation point, way
below the limit for total payload size.
Since too large payloads would have been discarded before they hit Relay
anyway, it seems fair to drop the truncation for now and observe.
We can safely revert this change later if necessary.