-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
POTEL 33 - Record dropped spans when sampling OpenTelemetry spans #3552
POTEL 33 - Record dropped spans when sampling OpenTelemetry spans #3552
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
57732e8 | 435.66 ms | 510.50 ms | 74.84 ms |
a0f7731 | 357.02 ms | 433.40 ms | 76.38 ms |
41e496a | 408.90 ms | 491.32 ms | 82.42 ms |
a59fca2 | 560.08 ms | 658.80 ms | 98.71 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
57732e8 | 1.70 MiB | 2.29 MiB | 599.77 KiB |
a0f7731 | 1.70 MiB | 2.29 MiB | 599.77 KiB |
41e496a | 1.70 MiB | 2.29 MiB | 599.77 KiB |
a59fca2 | 1.70 MiB | 2.29 MiB | 599.77 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
scopes | ||
.getOptions() | ||
.getClientReportRecorder() | ||
.recordLostEvent(DiscardReason.SAMPLE_RATE, DataCategory.Span); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there always only one span here, or should we also count the children?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sampler is invoked per span, before it's even started, we don't know the number of children it'll eventually have at this point. I can add something to the TODO list to see if we can come up with a number after the fact, but I'm not sure there's a callback that'll allow us to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a way to record for child spans as well. We now record a lost span when copying a parent sampling decision that is false
.
📜 Description
We now record one dropped span and one dropped transaction, whenever we sample a root transaction in
SentrySampler
.💡 Motivation and Context
Better client reports
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps