-
Notifications
You must be signed in to change notification settings - Fork 145
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
Use UserKeep(2)/UserReject(-1) in the rules-based sampler #1937
Use UserKeep(2)/UserReject(-1) in the rules-based sampler #1937
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
57edb48
to
d6c64cf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
efc1f98
to
ffa083e
Compare
30500fa
to
c04569c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
tracer/test/Datadog.Trace.Tests/Sampling/RuleBasedSamplerTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrew Lock <[email protected]> Co-authored-by: Zach Montoya <[email protected]>
Benchmarks Report 🐌Benchmarks for #1937 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472 | 1.154 | 6,224.26 | 7,182.05 | several? |
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net472 | 6.266 μs | 0.1127 μs | 0.1425 μs | 0.3496 | 0.0000 | 0.0000 | 2.19 KB |
master | SendAsync |
netcoreapp3.1 | 4.336 μs | 0.0573 μs | 0.0508 μs | 0.0306 | 0.0000 | 0.0000 | 2.09 KB |
#1937 | SendAsync |
net472 | 7.165 μs | 0.1421 μs | 0.2965 μs | 0.3502 | 0.0000 | 0.0000 | 2.19 KB |
#1937 | SendAsync |
netcoreapp3.1 | 4.784 μs | 0.0929 μs | 0.1447 μs | 0.0306 | 0.0000 | 0.0000 | 2.09 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net472 | 4.066 μs | 0.0529 μs | 0.0469 μs | 0.2857 | 0.0000 | 0.0000 | 1.79 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.807 μs | 0.0412 μs | 0.0344 μs | 0.0285 | 0.0000 | 0.0000 | 1.94 KB |
#1937 | EnrichedLog |
net472 | 4.334 μs | 0.0422 μs | 0.0353 μs | 0.2862 | 0.0000 | 0.0000 | 1.79 KB |
#1937 | EnrichedLog |
netcoreapp3.1 | 3.966 μs | 0.0120 μs | 0.0093 μs | 0.0278 | 0.0000 | 0.0000 | 1.94 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net472 | 181.8 μs | 2.75 μs | 2.44 μs | 0.6434 | 0.1838 | 0.0000 | 5.23 KB |
master | EnrichedLog |
netcoreapp3.1 | 153.4 μs | 2.23 μs | 1.98 μs | 0.0000 | 0.0000 | 0.0000 | 5.05 KB |
#1937 | EnrichedLog |
net472 | 188.1 μs | 2.12 μs | 1.88 μs | 0.6540 | 0.1868 | 0.0000 | 5.23 KB |
#1937 | EnrichedLog |
netcoreapp3.1 | 159.3 μs | 2.27 μs | 2.13 μs | 0.0781 | 0.0000 | 0.0000 | 5.05 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net472 | 12.46 μs | 0.244 μs | 0.216 μs | 0.8539 | 0.0000 | 0.0000 | 5.31 KB |
master | EnrichedLog |
netcoreapp3.1 | 10.54 μs | 0.179 μs | 0.158 μs | 0.0898 | 0.0000 | 0.0000 | 6.28 KB |
#1937 | EnrichedLog |
net472 | 13.03 μs | 0.240 μs | 0.200 μs | 0.8514 | 0.0000 | 0.0000 | 5.31 KB |
#1937 | EnrichedLog |
netcoreapp3.1 | 11.09 μs | 0.095 μs | 0.074 μs | 0.0897 | 0.0000 | 0.0000 | 6.28 KB |
Benchmarks.Trace.RedisBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #1937
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1
1.149
1,988.83
2,285.45
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1 | 1.149 | 1,988.83 | 2,285.45 |
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net472 | 2.231 μs | 0.0344 μs | 0.0305 μs | 0.1549 | 0.0000 | 0.0000 | 987 B |
master | SendReceive |
netcoreapp3.1 | 1.995 μs | 0.0305 μs | 0.0285 μs | 0.0137 | 0.0000 | 0.0000 | 984 B |
#1937 | SendReceive |
net472 | 2.447 μs | 0.0355 μs | 0.0315 μs | 0.1540 | 0.0000 | 0.0000 | 987 B |
#1937 | SendReceive |
netcoreapp3.1 | 2.293 μs | 0.0238 μs | 0.0223 μs | 0.0132 | 0.0000 | 0.0000 | 984 B |
Benchmarks.Trace.SerilogBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #1937
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑netcoreapp3.1
1.131
7,143.16
8,081.87
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑netcoreapp3.1 | 1.131 | 7,143.16 | 8,081.87 |
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net472 | 7.947 μs | 0.1451 μs | 0.1286 μs | 0.4472 | 0.0000 | 0.0000 | 2.8 KB |
master | EnrichedLog |
netcoreapp3.1 | 7.119 μs | 0.1328 μs | 0.1177 μs | 0.0371 | 0.0000 | 0.0000 | 2.61 KB |
#1937 | EnrichedLog |
net472 | 8.906 μs | 0.0875 μs | 0.0731 μs | 0.4455 | 0.0000 | 0.0000 | 2.8 KB |
#1937 | EnrichedLog |
netcoreapp3.1 | 8.116 μs | 0.1552 μs | 0.1376 μs | 0.0360 | 0.0000 | 0.0000 | 2.61 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #1937
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.607
1,124.61
1,807.44
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.607 | 1,124.61 | 1,807.44 |
Raw results
Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net472 | 972.8 ns | 19.21 ns | 38.36 ns | 0.0681 | 0.0000 | 0.0000 | 433 B |
master | StartFinishSpan |
netcoreapp3.1 | 877.9 ns | 7.32 ns | 6.85 ns | 0.0062 | 0.0000 | 0.0000 | 432 B |
master | StartFinishScope |
net472 | 1,103.0 ns | 12.53 ns | 16.72 ns | 0.0802 | 0.0000 | 0.0000 | 514 B |
master | StartFinishScope |
netcoreapp3.1 | 1,125.1 ns | 16.59 ns | 13.85 ns | 0.0079 | 0.0000 | 0.0000 | 552 B |
#1937 | StartFinishSpan |
net472 | 967.0 ns | 10.29 ns | 9.63 ns | 0.0679 | 0.0000 | 0.0000 | 433 B |
#1937 | StartFinishSpan |
netcoreapp3.1 | 940.3 ns | 18.52 ns | 31.94 ns | 0.0058 | 0.0000 | 0.0000 | 432 B |
#1937 | StartFinishScope |
net472 | 1,221.8 ns | 22.74 ns | 44.88 ns | 0.0804 | 0.0000 | 0.0000 | 514 B |
#1937 | StartFinishScope |
netcoreapp3.1 | 1,690.4 ns | 112.45 ns | 331.57 ns | 0.0075 | 0.0000 | 0.0000 | 552 B |
Code Coverage Report 📊✔️ Merging #1937 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
View the full reports for further details: |
see also
To quote @dgoffredo from the
DataDog/dd-opentracing-cpp
PR above: