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

[Epic] Extrapolation for extracted metrics #3724

Open
6 of 12 tasks
jjbayer opened this issue Jun 13, 2024 · 1 comment
Open
6 of 12 tasks

[Epic] Extrapolation for extracted metrics #3724

jjbayer opened this issue Jun 13, 2024 · 1 comment
Assignees

Comments

@jjbayer
Copy link
Member

jjbayer commented Jun 13, 2024

SDKS apply a client-side sampling rate to transactions / spans, so any metrics we extract from them are inherently sampled, even with server-side sampling disabled. To represent the sampling rate, take the client-side sampling rate from the envelope header and add it as a weight to any metric bucket extracted from the transaction / span payload (weight := 1.0 / dsc.sample_rate). When merging two buckets, add their weights together.

Tech Spec

https://www.notion.so/sentry/Metrics-Extrapolation-520ab136cb7d48ebb77be9a538bdef91

Open question: data duplication

Ideally, storage supports these weights as well. If / as long as storage does not support weights, we could convert weights into repeated data in Relay.

Preparation

  1. jan-auer

Custom Span Attributes

  1. jan-auer
  2. Scope: Backend
  3. priscilawebdev
  4. jan-auer

Internal Test: Spans and Transactions

  1. priscilawebdev

Public: Spans and Transactions

@iambriccardo
Copy link
Member

I am not an expert but given two buckets b1 and b2 with weights w1 and w2, if you sum w1 + w2 during merge you will not get the equivalent extrapolation as if you were to compute it correctly as as 1.0 / ((b1 * w1) + (b2 * w2) / (b1 + b2)).

I may be missing something though.

@jan-auer jan-auer self-assigned this Jun 20, 2024
@jan-auer jan-auer changed the title Extrapolation for extracted metrics [Milestone] Extrapolation for extracted metrics Jun 24, 2024
@jan-auer jan-auer changed the title [Milestone] Extrapolation for extracted metrics [Epic] [Milestone] Extrapolation for extracted metrics Jun 24, 2024
@matejminar matejminar changed the title [Epic] [Milestone] Extrapolation for extracted metrics [Epic] Extrapolation for extracted metrics Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗️ In Progress
Development

No branches or pull requests

3 participants