-
Notifications
You must be signed in to change notification settings - Fork 93
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): Route to different aggregators #2341
Conversation
.map(|mri| mri.namespace) | ||
.ok() | ||
}); | ||
// TODO: Parse MRI only once, move validation from Aggregator here. |
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.
Will take care of this in a follow-up.
} | ||
}); | ||
}); | ||
relay_statsd::metric!( |
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.
really wish github would show it in another color if only the indentation changed
Aggregator::InsertMetrics(msg) => self.handle_metrics(msg), | ||
Aggregator::MergeBuckets(msg) => self.handle_metrics(msg), | ||
#[cfg(test)] | ||
Aggregator::BucketCountInquiry(_, _sender) => (), // not supported |
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 suppose this is fine because the tests will simply use the aggregator service directly?
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.
Yeah it's not ideal, but acceptable IMO because this message is only used in one test.
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.
Reading through it, it makes sense to me and seems pretty clever. Although I'm not that confident to know I didn't miss any details since most my effort was on understanding it as a whole
Co-authored-by: Tor <tor.saebjoernsen@sentry.io>
We currently shift the flush time of each metrics bucket by an offset based on the project key. This prevents large peaks every interval, but still allows flushing buckets from the same projects together, which makes sense especially when the buckets are then sent to the upstream in per-project envelopes. With span metrics, we have seen that even buckets from the same project can cause a lot of traffic. With #2341, we want to increase the bucket interval for span metrics to one minute. To prevent large, project-specific peaks for span metrics, allow configuring a more random distribution over time. This should be used only in processing Relays where buckets are sent via Kafka.
Follow-up to #2341: Now that span metrics can have their own configuration, use the correct one to trim span descriptions.
Place a router in front of the
relay_metrics::Aggregator
service, to allow different aggregator configurations for different use cases. This will allow us toOld:
New: