getsentry / relay

Sentry event forwarding and ingestion service.
https://docs.sentry.io/product/relay/
Other
312 stars 85 forks source link

feat(metrics): Add ability to compute metrics summary and attach it to events #3769

Open iambriccardo opened 6 days ago

iambriccardo commented 6 days ago

This PR introduces functionality to compute metric summaries from a slice of Buckets, adhering to the semantics currently used in our SDKs.

The motivation for this change stems from our decision to discontinue metric emission from SDKs, instead extracting them in Relay through specified configurations. Without this update, the current Relay implementation would compromise the product experience, as it cannot extract metric summaries from event-derived metrics. This PR addresses and resolves this limitation.

Currently, metrics summaries are computed only for metrics belonging to the custom namespace.

Closes: https://github.com/getsentry/sentry/issues/73152