POTEL 33 - Record dropped spans when sampling OpenTelemetry spans#3552
Merged
POTEL 33 - Record dropped spans when sampling OpenTelemetry spans#3552
Conversation
Contributor
|
Contributor
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 |
stefanosiano
reviewed
Jul 5, 2024
| scopes | ||
| .getOptions() | ||
| .getClientReportRecorder() | ||
| .recordLostEvent(DiscardReason.SAMPLE_RATE, DataCategory.Span); |
Contributor
There was a problem hiding this comment.
Is there always only one span here, or should we also count the children?
Member
Author
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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.
Base automatically changed from
feat/potel-32-attach-active-span-to-scope
to
8.x.x
July 5, 2024 13:22
An error occurred while trying to automatically change base from
feat/potel-32-attach-active-span-to-scope
to
8.x.x
July 5, 2024 13:22
54 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.
📜 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
sendDefaultPIIis enabled.🔮 Next steps