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(metrics-summaries): Emit summaries to their own topic #3045

Merged
merged 22 commits into from
Feb 15, 2024

Conversation

phacops
Copy link
Contributor

@phacops phacops commented Feb 2, 2024

Instead of pushing metrics summaries as part of spans and having the Snuba consumer reads all spans, we're going to emit metrics summaries to their own topic.

@phacops phacops marked this pull request as ready for review February 2, 2024 15:27
@phacops phacops requested a review from a team as a code owner February 2, 2024 15:27
KafkaTopic::MetricsSummaries,
scoping.organization_id,
KafkaMessage::MetricsSummary(MetricsSummaryKafkaMessage {
count: summary.count.unwrap_or_default(),
Copy link
Member

Choose a reason for hiding this comment

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

I assume that the fields of MetricsSummary are Optional for a reason. IMO we should do one of two things:

  1. Make the fields of MetricsSummary non-optional.
  2. If it actually makes sense that these fields are empty, make the consumer accept missing / null values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I forgot where I was going with this. The consumer supports missing values but not null values and I think I wanted to turn that into non-optional values.

@phacops phacops requested a review from jjbayer February 6, 2024 23:53
Comment on lines +117 to +118
/// Summary for metrics collected during a span.
pub metrics_summaries: TopicAssignment,
Copy link
Member

Choose a reason for hiding this comment

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

Let's make sure we have the topic created and relay configuration in place before merging this, to not risk auto-creating the topic on the default cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The topic was already created by @mwarkentin on the spans cluster but I should probably add some config to Relay in order to not auto-create it on the events cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@phacops phacops requested a review from jjbayer February 12, 2024 13:59
@phacops
Copy link
Contributor Author

phacops commented Feb 12, 2024

Created a schema for this topic: getsentry/sentry-kafka-schemas#212.

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.

See note about removing outcome, rest looks good to me! Is the config for SaaS already in place?

@phacops phacops merged commit 3477d0c into master Feb 15, 2024
20 checks passed
@phacops phacops deleted the pierre/metrics-summaries-push-to-separate-topic branch February 15, 2024 18:10
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