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

feat(spans): Forward span.data on the Kafka message #3523

Merged
merged 5 commits into from
May 6, 2024

Conversation

phacops
Copy link
Contributor

@phacops phacops commented May 2, 2024

We'd like to use more data from the span and eventually store it. First step is to add it to the span Kafka message so downstream can use it.

We understand there might be some duplication between sentry_tags and data and we accept it for now to not have to parse the object.

@phacops phacops requested a review from jjbayer May 2, 2024 22:50
@phacops phacops self-assigned this May 2, 2024
@phacops phacops requested a review from a team as a code owner May 2, 2024 22:50
@@ -1390,6 +1390,8 @@ struct SpanKafkaMessage<'a> {
#[serde(default)]
is_segment: bool,

#[serde(default, skip_serializing_if = "none_or_empty_object")]
data: Option<&'a RawValue>,
Copy link
Member

Choose a reason for hiding this comment

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

I was confused where this field is set, then saw that it's because of the useless serialization roundtrip 🤣

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we're basically trying to make the roundtrip as cheap as possible.

Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

If the Kafka broker and consumers can take the increase in message size, ship it!

Might be worth doing a Canary deploy (deploy-relay-experimental) first to see if the maximum message size or consumer processing time increases.

@@ -1390,6 +1390,8 @@ struct SpanKafkaMessage<'a> {
#[serde(default)]
is_segment: bool,

#[serde(default, skip_serializing_if = "none_or_empty_object")]
data: Option<&'a RawValue>,
Copy link
Member

Choose a reason for hiding this comment

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

Yeah we're basically trying to make the roundtrip as cheap as possible.

@phacops phacops merged commit de7671b into master May 6, 2024
22 checks passed
@phacops phacops deleted the pierre/spans-send-data-in-the-kafka-message branch May 6, 2024 16:39
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