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

MTG-819 Add metrics for data processing time #296

Merged
merged 3 commits into from
Oct 28, 2024
Merged

MTG-819 Add metrics for data processing time #296

merged 3 commits into from
Oct 28, 2024

Conversation

n00m4d
Copy link
Contributor

@n00m4d n00m4d commented Oct 28, 2024

What

This PR adds new metrics - MessageProcessMetricsConfig.

Why

It will allow us to see how fast indexer process data received from Geyser plugin.

How

Metric call was added to main accounts and transactions processing functions. By main functions I mean functions where we extract data from Redis(or TCP connection), call processor and then call acknowledge. It means that during backfill processes that metrics will not be changed.

Copy link
Contributor

@StanChe StanChe left a comment

Choose a reason for hiding this comment

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

Great job, thank you

pub fn new() -> Self {
Self {
accounts_read: Family::<MetricLabel, Histogram>::new_with_constructor(|| {
Histogram::new(exponential_buckets(1.0, 1.8, 10))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd revise this, as it'll have buckets up to 357ms, which seems to be too low

@@ -119,6 +121,61 @@ pub struct MetricLabelWithStatus {
pub status: MetricStatus,
}

#[derive(Debug, Clone)]
pub struct MessageProcessMetricsConfig {
accounts_read: Family<MetricLabel, Histogram>,
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need 2, or just an additional label for account/transaction maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

Below you're using this label already, so this may be the same family

@n00m4d n00m4d merged commit 88e5d12 into main Oct 28, 2024
2 checks passed
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