Skip to content

Conversation

@jjbayer
Copy link
Member

@jjbayer jjbayer commented May 3, 2024

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

jjbayer added a commit that referenced this pull request Jun 4, 2024
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/).
@Dav1dde
Copy link
Member

Dav1dde commented May 20, 2025

Trace Id has been done in #4673, for the remaining span id, I opened a new issue.

@Dav1dde Dav1dde closed this May 20, 2025
@Dav1dde Dav1dde deleted the ref/schema-repr-bytes branch June 20, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants