Skip to content

ref(outcomes): Remove outcomes aggregator, implement forwarding of metrics as client reports#6107

Merged
Dav1dde merged 2 commits into
masterfrom
dav1d/metrics-to-client-reports
Jun 23, 2026
Merged

ref(outcomes): Remove outcomes aggregator, implement forwarding of metrics as client reports#6107
Dav1dde merged 2 commits into
masterfrom
dav1d/metrics-to-client-reports

Conversation

@Dav1dde

@Dav1dde Dav1dde commented Jun 18, 2026

Copy link
Copy Markdown
Member

Removes outcomes aggregator and also handles client reports via metrics.

The exception is proxy mode, as proxy mode does not resolve project configs, which means outcomes cannot be routed through the metrics aggregator. To ease this, there is a custom service implementation for proxy mode, which is very simple and not as optimized as the metrics aggregator, which is fine for a proxy Relay.

@Dav1dde Dav1dde marked this pull request as ready for review June 19, 2026 20:08
@Dav1dde Dav1dde requested a review from a team as a code owner June 19, 2026 20:08
Comment thread relay-server/src/services/outcome/client_report.rs Outdated
@Dav1dde Dav1dde force-pushed the dav1d/metrics-to-client-reports branch from 885efd1 to d9e4c25 Compare June 19, 2026 20:21
Comment thread relay-server/src/services/outcome/metric.rs
Comment thread relay-server/src/services/outcome/client_report.rs Outdated
@Dav1dde Dav1dde force-pushed the dav1d/metrics-to-client-reports branch from d9e4c25 to af245c2 Compare June 19, 2026 20:26
Comment thread relay-server/src/services/outcome/client_report.rs Outdated
cursor[bot]

This comment was marked as outdated.

@Dav1dde Dav1dde force-pushed the dav1d/metrics-to-client-reports branch 3 times, most recently from d313740 to 4f60062 Compare June 19, 2026 20:35
Comment thread relay-server/src/services/outcome/service.rs
@Dav1dde Dav1dde force-pushed the dav1d/metrics-to-client-reports branch from 4f60062 to bd38321 Compare June 19, 2026 20:52
cursor[bot]

This comment was marked as outdated.

@Dav1dde Dav1dde force-pushed the dav1d/metrics-to-client-reports branch from bd38321 to 275f411 Compare June 19, 2026 21:18
@Dav1dde Dav1dde force-pushed the dav1d/metrics-to-client-reports branch from 275f411 to e0c4b48 Compare June 19, 2026 21:23

@loewenheim loewenheim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, with one nit and a suggestion.


// Linear search is fine, we only have a limited amount of outcomes and volume as this
// service is only supposed to be used for proxy mode Relay.
let discaded_event = discarded_events

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
let discaded_event = discarded_events
let discarded_event = discarded_events

Outcome::Filtered(_) => &mut client_report.filtered_events,
Outcome::FilteredSampling(_) => &mut client_report.filtered_sampling_events,
Outcome::RateLimited(_) => &mut client_report.rate_limited_events,
let discarded_events: fn(&mut ClientReport) -> &mut _ = match message.outcome {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Alternatively you could do this entire match inline.

@Dav1dde Dav1dde added this pull request to the merge queue Jun 23, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 23, 2026
@Dav1dde Dav1dde added this pull request to the merge queue Jun 23, 2026
Merged via the queue into master with commit 8564706 Jun 23, 2026
49 of 51 checks passed
@Dav1dde Dav1dde deleted the dav1d/metrics-to-client-reports branch June 23, 2026 09:51
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