-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(spans): Convert a Sentry span to the Snuba span schema #2917
feat(spans): Convert a Sentry span to the Snuba span schema #2917
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integration test will need updating.
Co-authored-by: Joris Bayer <joris.bayer@sentry.io>
…t-from-protocol-to-snuba-spans-schema' into pierre/spans-convert-from-protocol-to-snuba-spans-schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about organization_id
. Rest looks good to me!
) # endpoint might overtake envelope | ||
|
||
assert spans == [ | ||
{ | ||
"organization_id": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need the organization ID, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't need organization_id
anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if the field is described in the schema, the Snuba consumer doesn't need it to insert data: https://github.com/getsentry/snuba/blob/master/rust_snuba/src/processors/spans.rs#L28-L53.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments about RawValue, but no blockers!
This definitely needs a Canary deploy, that is
- Pause
deploy-relay
- Deploy
deploy-relay-experimental
- Let run for ~1h and watch for consumer errors.
- If no errors and span volume is the same as before, unpause
deploy-relay
and deploy there as well.
Canary can also be reverted quickly.
) # endpoint might overtake envelope | ||
|
||
assert spans == [ | ||
{ | ||
"organization_id": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright.
…t-from-protocol-to-snuba-spans-schema' into pierre/spans-convert-from-protocol-to-snuba-spans-schema
We're working on pushing spans directly to Snuba instead of going through a Sentry consumer. This will produce to Kafka the proper schema understood by the Snuba consumer.
The way I did that is a bit convoluted right now. The envelope contains a Sentry span we parse using the Span protocol which needs to then be converted to the Kafka message which will use serde. This can be simplified by parsing the span in the envelope directly into a serde-compatible struct (which means when we modify the span, we now have to modify 2 places). Do you think the trade-off is worth it?
I would have reused the annotated protocol but we then can't pass it nicely to the producer to be serialized.
It will still push to the
ingest-spans
topic until we change the config so we're going to need this PR merged and deployed before we can deploy this change: getsentry/sentry#62527.