Respect incoming parent sampled decision when continuing a trace#2311
Conversation
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2c5f172 | 289.18 ms | 307.56 ms | 18.38 ms |
| 4ca1d7b | 331.33 ms | 335.78 ms | 4.45 ms |
| 54cebc8 | 300.86 ms | 341.43 ms | 40.57 ms |
| 3d89dea | 322.38 ms | 350.82 ms | 28.45 ms |
| 221a5df | 350.61 ms | 391.58 ms | 40.97 ms |
| 1e4690d | 354.69 ms | 387.88 ms | 33.19 ms |
| 4dd88fe | 306.88 ms | 391.58 ms | 84.70 ms |
| 2c5f172 | 351.18 ms | 373.52 ms | 22.34 ms |
| 2c5f172 | 310.20 ms | 357.16 ms | 46.96 ms |
| d4087ee | 278.00 ms | 313.86 ms | 35.86 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2c5f172 | 1.73 MiB | 2.29 MiB | 580.10 KiB |
| 4ca1d7b | 1.73 MiB | 2.29 MiB | 579.88 KiB |
| 54cebc8 | 1.73 MiB | 2.29 MiB | 579.43 KiB |
| 3d89dea | 1.74 MiB | 2.33 MiB | 604.92 KiB |
| 221a5df | 1.73 MiB | 2.29 MiB | 581.39 KiB |
| 1e4690d | 1.74 MiB | 2.33 MiB | 604.92 KiB |
| 4dd88fe | 1.73 MiB | 2.29 MiB | 579.50 KiB |
| 2c5f172 | 1.73 MiB | 2.29 MiB | 580.10 KiB |
| 2c5f172 | 1.73 MiB | 2.29 MiB | 580.10 KiB |
| d4087ee | 1.73 MiB | 2.29 MiB | 579.50 KiB |
Codecov ReportBase: 80.09% // Head: 80.17% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2311 +/- ##
============================================
+ Coverage 80.09% 80.17% +0.07%
- Complexity 3431 3435 +4
============================================
Files 242 242
Lines 12756 12757 +1
Branches 1703 1704 +1
============================================
+ Hits 10217 10228 +11
+ Misses 1890 1879 -11
- Partials 649 650 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@stefanosiano there's a flakey test which I've also encountered in another PR - could you perhaps take a look at it when you got time? https://github.com/getsentry/sentry-java/actions/runs/3281479762/jobs/5403550895 |
| baggage.freeze(); | ||
|
|
||
| Double sampleRate = baggage.getSampleRateDouble(); | ||
| Boolean sampled = parentSampled != null ? parentSampled.booleanValue() : true; |
There was a problem hiding this comment.
Why parentSampled is null should be sampled ?
📜 Description
When introducing
baggagewe ignored thesampleddecision coming in viasentry-trace. This caused incomingsampled=falseto not be honored.💡 Motivation and Context
Fixes #2308
💚 How did you test it?
Unit Tests
📝 Checklist
🔮 Next steps