Skip to content

feat(metrics): Attribute integration-emitted metrics - #3071

Merged
sl0thentr0py merged 5 commits into
masterfrom
feat/ruby-210-metric-integration-attribution
Sep 3, 2026
Merged

feat(metrics): Attribute integration-emitted metrics#3071
sl0thentr0py merged 5 commits into
masterfrom
feat/ruby-210-metric-integration-attribution

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Allow registered integrations to identify metrics emitted through the shared metrics API. Integration metadata now reaches metric attributes and envelope headers, with mixed batches partitioned by SDK identity so manual metrics remain attributed to sentry.ruby.

Wire the Yabeda adapter as the first consumer so its metrics are reported as sentry.ruby.yabeda.

Linear: https://linear.app/getsentry/issue/RUBY-210/attribute-auto-emitted-metrics-to-integrations

Requested by johdax.

Co-Authored-By: Johannes Daxboeck <johannes.daxboeck@sentry.io>
@linear-code

linear-code Bot commented Sep 3, 2026

Copy link
Copy Markdown

RUBY-210

@sl0thentr0py

Copy link
Copy Markdown
Member

The canonical way is to add the metrics methods with an attribute passthrough in
https://github.com/getsentry/sentry-ruby/blob/master/sentry-ruby/lib/sentry/integrable.rb

I can just take this over if you don't mind.

@sl0thentr0py

Copy link
Copy Markdown
Member

sdk.name and sdk.version should only be filled in scope.apply_to_telemetry, don't fill them in in MetricEvent but hold an integration_meta reference there that should be picked up in scope.apply_to_telemetry

@sl0thentr0py

Copy link
Copy Markdown
Member

telemetry_event_buffer new envelope doesn't actually need any headers except sent_at so remove all the other stuff and also revert the grouping

Comment thread sentry-ruby/spec/sentry/metric_event_spec.rb Outdated
@sl0thentr0py
sl0thentr0py marked this pull request as ready for review September 3, 2026 13:17
@sl0thentr0py
sl0thentr0py merged commit 2901a09 into master Sep 3, 2026
158 checks passed
@sl0thentr0py
sl0thentr0py deleted the feat/ruby-210-metric-integration-attribution branch September 3, 2026 13:31
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.

1 participant