-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spans): Do not trim essential fields (#3670)
Since #3645, we're seeing incomplete or missing trace IDs on spans (see linked sentry issues). What happens is that after visiting a long `span.description`, there is no budget left for essential fields and the trimming processor drops or trims them. * Introduce `trim = "false"` field attribute to disallow trimming of specific fields. * Apply the new field to `span.trace_id` and other essential fields to prevent them from being partially scrubbed or dropped entirely. Current limitations: - Not trimming these fields leads to over-accepting bytes. This should not matter as long as the fields that have `trim = "false"` are limited in size (which they are currently not, see #3535 as follow-up). - The more correct solution would be to subtract the length of `trim = "false"` fields _before_ trimming any other fields. - Alternatively, we could decide to never over-accept, and drop items after visiting them if the budget is negative. I implemented this in [1136f76](1136f76) but it resulted in more failing tests, because the current trimming processor already over-accepts a little bit (key lengths), and I did not want to touch the default behavior. cc @Dav1dde. Fixes [RELAY-2NY7](https://sentry.my.sentry.io/organizations/sentry/issues/1005495/), [RELAY-2NY8](https://sentry.my.sentry.io/organizations/sentry/issues/1005496/), [SNUBA-552](https://sentry.sentry.io/issues/5429321769/).
- Loading branch information
Showing
11 changed files
with
193 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.