Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(protocol): Represent SpanId and TraceId as bytes #3535

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

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/).
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.

1 participant