Repository navigation
fix(core): Use trace_metric data category for metrics rate limits and client reports - #25606
Merged
Merged
Conversation
We used `metric` as the data category for metrics, but Relay only knows `trace_metric`. Because of this, Relay treated metric client reports as `unknown`, and `trace_metric` rate limits never matched, so the SDK kept sending metrics while rate limited. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
trace_metric data category for metricstrace_metric data category for metrics client reports
Lms24
marked this pull request as ready for review
October 21, 2026 10:56
Contributor
size-limit report 📦Compared: 9977e5a (PR test merge using develop at 32e7a35) Against: 32e7a35 (develop) · base run #62893 ✅ Baseline matches: this diff contains only this PR's changes.
|
trace_metric data category for metrics client reportstrace_metric data category for metrics rate limits and client reports
nicohrubec
approved these changes
Oct 21, 2026
nicohrubec
left a comment
Member
There was a problem hiding this comment.
lgtm!
not related to this PR but the spec also mentions reporting trace_metric_byte, which I don't think we currently report. do you know what's the state on this?
Member
Author
|
yes that's correct but I'm trying to downgrade this from a MUST to a SHOULD, because size calculations have a perf overhead that I want to avoid in SDKs for stuff we throw away anyway. THere's an internal slack conversation about this. |
51 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the data category for metrics from
metrictotrace_metric, which fixes two bugs:trace_metriccategory never matched ourmetriccategory, so the SDK kept sending metrics. Global rate limits without a category still worked and were respected correctly, also for metrics.metriccategory, so it treated our metric client reports asunknown.The (metrics spec) requires
trace_metricfor both.