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(metric-stats): Emit accepted volume #3281

Merged
merged 7 commits into from
Mar 19, 2024

Conversation

Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Mar 18, 2024

Emits positive metric stats for the custom metrics namespace after submission to Kafka.

Only implements the happy path for metric stats and only volume.

@Dav1dde Dav1dde requested a review from a team as a code owner March 18, 2024 16:31
@Dav1dde Dav1dde force-pushed the dav1d/feat/metric-stats-volume branch from 58982c8 to e3897dc Compare March 18, 2024 16:42
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.

Looks good to me!

As discussed:

  • Slight preference for a global config org rollout rate.
  • Preference for a thread-less "service" / facade for MetricStatsService.

relay-metrics/src/view.rs Show resolved Hide resolved
relay-server/src/services/metric_stats.rs Outdated Show resolved Hide resolved
@Dav1dde Dav1dde self-assigned this Mar 19, 2024
/// and contain additional metadata, like the cardinality of a metric.
#[derive(Clone, Debug)]
pub struct MetricStats {
config: Arc<Config>,
Copy link
Member

Choose a reason for hiding this comment

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

nit: Is config only used to check processing_enabled? If so, we could give MetricStats a noop variant instead, something like

enum MetricStats {
    Disabled,
    Enabled {
        global_config: GlobalConfigHandle,
        aggregator: Addr<Aggregator>,
    }
}

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes dealing with self awkward, since I have to pattern match it in every method.

@Dav1dde Dav1dde force-pushed the dav1d/feat/metric-stats-volume branch from 29b3e41 to 328e79c Compare March 19, 2024 11:28
@Dav1dde Dav1dde force-pushed the dav1d/feat/metric-stats-volume branch from 821364d to 131093a Compare March 19, 2024 11:37
@Dav1dde Dav1dde enabled auto-merge (squash) March 19, 2024 13:25
@Dav1dde Dav1dde merged commit 230912c into master Mar 19, 2024
20 checks passed
@Dav1dde Dav1dde deleted the dav1d/feat/metric-stats-volume branch March 19, 2024 13:38
@Dav1dde Dav1dde mentioned this pull request Mar 19, 2024
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