Repository navigation
Commit 66ec2e8
authored
fix: don't label upstream-unsampled transactions as backpressure (#5841)
* fix: don't label upstream-unsampled transactions as backpressure
When StartTransaction runs without a TracesSampler and the sampling
decision comes from the incoming trace (context.IsSampled is false),
the discard reason was computed as backpressure whenever
sampleRand < TracesSampleRate, even while the backpressure monitor was
healthy (downsample factor 1). That comparison only implies downsampling
for a decision the SDK makes itself; for an upstream decision it does
not. Report such drops as sample_rate instead.
* test: fold upstream-unsampled cases into backpressure theory
Add an isSampledUpstream parameter to StartTransaction_Backpressure_SetsDiscardReason
with two extra rows (sampler branch keeps backpressure on an upstream not-sampled
decision; options branch reports sample_rate) and drop the now-redundant separate Fact.
Signed-off-by: Vladimir Babin <vovababin@gmail.com>
---------
Signed-off-by: Vladimir Babin <vovababin@gmail.com>1 parent d4a1de1 commit 66ec2e8
2 files changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1041 | 1043 | | |
1042 | 1044 | | |
1043 | | - | |
| 1045 | + | |
1044 | 1046 | | |
1045 | 1047 | | |
1046 | 1048 | | |
| |||
0 commit comments