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

fix(spans): Max description length #3115

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Feb 15, 2024

Do not attempt to parse very long span description.

This should prevent stack overflows in the SQL parser.

We could also limit the length of the description field by setting a bag_size attribute on it. Unfortunately, the TrimmingProcessor runs after other normalization steps, so it would not help in this case.

ref: https://github.com/getsentry/team-ingest/issues/272

Comment on lines +45 to +48
relay_log::error!(
description = description,
"Span description too large to parse"
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this error at a later point.

@jjbayer jjbayer marked this pull request as ready for review February 15, 2024 10:38
@jjbayer jjbayer requested a review from a team as a code owner February 15, 2024 10:38
@jjbayer jjbayer merged commit eba85e3 into master Feb 15, 2024
20 checks passed
@jjbayer jjbayer deleted the fix/spans-max-description-length branch February 15, 2024 12:36
jjbayer added a commit that referenced this pull request Feb 16, 2024
All stack overflows after upgrading to sqlparser 0.43 occurred in
`.clone()`, not during parsing (see
[POP-RELAY-30P](https://sentry.my.sentry.io/organizations/sentry/issues/645286/)).

We cloned the parsed query to reuse it for table name extraction. But
table name extraction should work just as well on the scrubbed query, so
the clone is unnecessary.

This PR also reverts #3115.

ref: getsentry/team-ingest#272
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.

3 participants