-
Notifications
You must be signed in to change notification settings - Fork 140
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
Baggage part 3/3: add public api to Datadog.Trace.Manual
#6190
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @lucaspimentel and the rest of your teammates on Graphite |
Datadog ReportBranch report: ✅ 0 Failed, 364484 Passed, 2062 Skipped, 14h 51m 7.23s Total Time |
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6190) - mean (69ms) : 68, 71
. : milestone, 69,
master - mean (70ms) : 68, 73
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (6190) - mean (1,113ms) : 1095, 1131
. : milestone, 1113,
master - mean (1,125ms) : 1072, 1177
. : milestone, 1125,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6190) - mean (109ms) : 106, 111
. : milestone, 109,
master - mean (109ms) : 106, 111
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6190) - mean (770ms) : 753, 787
. : milestone, 770,
master - mean (782ms) : 767, 796
. : milestone, 782,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6190) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 95
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6190) - mean (728ms) : 713, 743
. : milestone, 728,
master - mean (750ms) : 683, 817
. : milestone, 750,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6190) - mean (190ms) : 185, 194
. : milestone, 190,
master - mean (190ms) : 186, 194
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (6190) - mean (1,230ms) : 1209, 1251
. : milestone, 1230,
master - mean (1,228ms) : 1203, 1253
. : milestone, 1228,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6190) - mean (275ms) : 270, 280
. : milestone, 275,
master - mean (276ms) : 271, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6190) - mean (949ms) : 934, 965
. : milestone, 949,
master - mean (951ms) : 937, 965
. : milestone, 951,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6190) - mean (264ms) : 259, 269
. : milestone, 264,
master - mean (265ms) : 261, 269
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6190) - mean (931ms) : 912, 949
. : milestone, 931,
master - mean (936ms) : 916, 957
. : milestone, 936,
|
Datadog.Trace.Manual
Throughput/Crank Report ⚡Throughput results for AspNetCoreSimpleController comparing the following branches/commits: Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red. Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6190) (11.093M) : 0, 11093153
master (10.993M) : 0, 10993209
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6190) (7.135M) : 0, 7135446
master (7.203M) : 0, 7203027
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.503M) : 0, 7502500
section Manual
master (11.115M) : 0, 11115249
section Manual + Automatic
This PR (6190) (6.657M) : 0, 6656905
master (6.650M) : 0, 6649770
section DD_TRACE_ENABLED=0
master (10.379M) : 0, 10378918
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6190) (9.379M) : 0, 9378538
master (9.396M) : 0, 9395989
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6190) (6.489M) : 0, 6489402
master (6.432M) : 0, 6432181
section Trace stats
master (6.826M) : 0, 6826388
section Manual
master (9.596M) : 0, 9595811
section Manual + Automatic
This PR (6190) (5.868M) : 0, 5868255
master (6.016M) : 0, 6015725
section DD_TRACE_ENABLED=0
master (8.730M) : 0, 8730305
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6190) (9.843M) : 0, 9843320
master (9.836M) : 0, 9835977
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6190) (6.323M) : 0, 6323449
master (6.334M) : 0, 6333662
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (7.012M) : 0, 7011750
section Manual
master (9.898M) : 0, 9897743
section Manual + Automatic
This PR (6190) (6.017M) : 0, 6017446
master (5.778M) : 0, 5777929
section DD_TRACE_ENABLED=0
master (9.111M) : 0, 9110736
|
4e13e08
to
909841c
Compare
Benchmarks Report for tracer 🐌Benchmarks for #6190 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 | 1.117 | 1,271.29 | 1,420.37 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.21μs | 1.38ns | 5.16ns | 0.014 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.62μs | 0.574ns | 2.15ns | 0.0131 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.5μs | 2.36ns | 9.14ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.27μs | 0.703ns | 2.72ns | 0.0133 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.65μs | 0.741ns | 2.87ns | 0.0139 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.67μs | 1.94ns | 7.5ns | 0.166 | 0 | 0 | 1.05 KB |
#6190 | CallElasticsearch |
net6.0 | 1.26μs | 0.536ns | 2.01ns | 0.0139 | 0 | 0 | 976 B |
#6190 | CallElasticsearch |
netcoreapp3.1 | 1.6μs | 0.747ns | 2.79ns | 0.0128 | 0 | 0 | 976 B |
#6190 | CallElasticsearch |
net472 | 2.52μs | 1.29ns | 4.66ns | 0.157 | 0 | 0 | 995 B |
#6190 | CallElasticsearchAsync |
net6.0 | 1.42μs | 0.915ns | 3.54ns | 0.0135 | 0 | 0 | 952 B |
#6190 | CallElasticsearchAsync |
netcoreapp3.1 | 1.65μs | 3.01ns | 11.3ns | 0.0135 | 0 | 0 | 1.02 KB |
#6190 | CallElasticsearchAsync |
net472 | 2.51μs | 0.859ns | 3.21ns | 0.167 | 0 | 0 | 1.05 KB |
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6190
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0
1.206
1,219.34
1,470.30
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 | 1.206 | 1,219.34 | 1,470.30 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.22μs | 0.394ns | 1.36ns | 0.0132 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 0.815ns | 3.16ns | 0.0125 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.69μs | 1.63ns | 6.32ns | 0.145 | 0 | 0 | 915 B |
#6190 | ExecuteAsync |
net6.0 | 1.48μs | 4.49ns | 17.4ns | 0.0132 | 0 | 0 | 952 B |
#6190 | ExecuteAsync |
netcoreapp3.1 | 1.67μs | 0.893ns | 3.34ns | 0.0126 | 0 | 0 | 952 B |
#6190 | ExecuteAsync |
net472 | 1.77μs | 0.56ns | 2.09ns | 0.145 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net6.0 | 4.58μs | 1.32ns | 4.77ns | 0.0321 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.26μs | 1.28ns | 4.8ns | 0.0369 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.78μs | 2.72ns | 10.5ns | 0.494 | 0 | 0 | 3.12 KB |
#6190 | SendAsync |
net6.0 | 4.33μs | 2.9ns | 10.8ns | 0.0324 | 0 | 0 | 2.31 KB |
#6190 | SendAsync |
netcoreapp3.1 | 5.17μs | 2.02ns | 7.3ns | 0.0388 | 0 | 0 | 2.85 KB |
#6190 | SendAsync |
net472 | 7.44μs | 2.22ns | 8.3ns | 0.495 | 0 | 0 | 3.12 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.58μs | 0.577ns | 2.16ns | 0.0229 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.18μs | 0.857ns | 3.21ns | 0.022 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.66μs | 1.47ns | 5.08ns | 0.25 | 0 | 0 | 1.57 KB |
#6190 | EnrichedLog |
net6.0 | 1.53μs | 0.919ns | 3.44ns | 0.0231 | 0 | 0 | 1.64 KB |
#6190 | EnrichedLog |
netcoreapp3.1 | 2.23μs | 1.3ns | 5.02ns | 0.0221 | 0 | 0 | 1.64 KB |
#6190 | EnrichedLog |
net472 | 2.69μs | 2.21ns | 8.57ns | 0.249 | 0 | 0 | 1.57 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 119μs | 104ns | 391ns | 0.0588 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 124μs | 469ns | 1.81μs | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 156μs | 222ns | 860ns | 0.706 | 0.235 | 0 | 4.46 KB |
#6190 | EnrichedLog |
net6.0 | 116μs | 245ns | 882ns | 0.0576 | 0 | 0 | 4.28 KB |
#6190 | EnrichedLog |
netcoreapp3.1 | 121μs | 136ns | 508ns | 0 | 0 | 0 | 4.28 KB |
#6190 | EnrichedLog |
net472 | 154μs | 148ns | 572ns | 0.695 | 0.232 | 0 | 4.46 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 3.02μs | 1.31ns | 5.07ns | 0.031 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.14μs | 0.817ns | 2.83ns | 0.0289 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.92μs | 1.16ns | 4.17ns | 0.321 | 0 | 0 | 2.02 KB |
#6190 | EnrichedLog |
net6.0 | 3.15μs | 0.936ns | 3.5ns | 0.0298 | 0 | 0 | 2.2 KB |
#6190 | EnrichedLog |
netcoreapp3.1 | 4.21μs | 1.48ns | 5.72ns | 0.0294 | 0 | 0 | 2.2 KB |
#6190 | EnrichedLog |
net472 | 5μs | 1.06ns | 4.12ns | 0.32 | 0 | 0 | 2.02 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.33μs | 0.429ns | 1.66ns | 0.0159 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.83μs | 0.845ns | 3.27ns | 0.0156 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.15μs | 0.992ns | 3.84ns | 0.183 | 0 | 0 | 1.16 KB |
#6190 | SendReceive |
net6.0 | 1.4μs | 0.779ns | 3.02ns | 0.0162 | 0 | 0 | 1.14 KB |
#6190 | SendReceive |
netcoreapp3.1 | 1.81μs | 1.16ns | 4.5ns | 0.0154 | 0 | 0 | 1.14 KB |
#6190 | SendReceive |
net472 | 2.22μs | 2.29ns | 8.86ns | 0.183 | 0 | 0 | 1.16 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.82μs | 5.35ns | 20.7ns | 0.0225 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.97μs | 1.67ns | 6.45ns | 0.0218 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.33μs | 5.36ns | 19.3ns | 0.323 | 0 | 0 | 2.04 KB |
#6190 | EnrichedLog |
net6.0 | 2.74μs | 1.37ns | 5.31ns | 0.0219 | 0 | 0 | 1.6 KB |
#6190 | EnrichedLog |
netcoreapp3.1 | 3.84μs | 1.9ns | 7.12ns | 0.0211 | 0 | 0 | 1.65 KB |
#6190 | EnrichedLog |
net472 | 4.31μs | 1.66ns | 6.21ns | 0.324 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 410ns | 0.186ns | 0.721ns | 0.00804 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 563ns | 0.322ns | 1.21ns | 0.00783 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 701ns | 0.974ns | 3.64ns | 0.0915 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 517ns | 0.475ns | 1.84ns | 0.00989 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 729ns | 0.632ns | 2.45ns | 0.00936 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 854ns | 0.698ns | 2.61ns | 0.104 | 0 | 0 | 658 B |
#6190 | StartFinishSpan |
net6.0 | 420ns | 0.196ns | 0.735ns | 0.00807 | 0 | 0 | 576 B |
#6190 | StartFinishSpan |
netcoreapp3.1 | 616ns | 0.345ns | 1.33ns | 0.00778 | 0 | 0 | 576 B |
#6190 | StartFinishSpan |
net472 | 743ns | 0.899ns | 3.48ns | 0.0918 | 0 | 0 | 578 B |
#6190 | StartFinishScope |
net6.0 | 543ns | 0.425ns | 1.65ns | 0.00978 | 0 | 0 | 696 B |
#6190 | StartFinishScope |
netcoreapp3.1 | 775ns | 1.56ns | 5.82ns | 0.00921 | 0 | 0 | 696 B |
#6190 | StartFinishScope |
net472 | 917ns | 0.516ns | 2ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6190
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.193
649.63
774.87
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.193 | 649.63 | 774.87 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 649ns | 0.313ns | 1.17ns | 0.00979 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 998ns | 0.786ns | 3.04ns | 0.00948 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.18μs | 0.603ns | 2.25ns | 0.104 | 0 | 0 | 658 B |
#6190 | RunOnMethodBegin |
net6.0 | 776ns | 0.451ns | 1.75ns | 0.0097 | 0 | 0 | 696 B |
#6190 | RunOnMethodBegin |
netcoreapp3.1 | 912ns | 0.489ns | 1.89ns | 0.0092 | 0 | 0 | 696 B |
#6190 | RunOnMethodBegin |
net472 | 1.18μs | 0.333ns | 1.29ns | 0.104 | 0 | 0 | 658 B |
909841c
to
d61d185
Compare
ad32a8f
to
f2266b1
Compare
d61d185
to
ba0ca33
Compare
f2266b1
to
07f07b8
Compare
ba0ca33
to
eecdaf9
Compare
07f07b8
to
b87fe14
Compare
eecdaf9
to
5655899
Compare
9fd32aa
to
0aca775
Compare
5655899
to
60a858e
Compare
0aca775
to
89b0391
Compare
60a858e
to
e836d52
Compare
89b0391
to
722e574
Compare
...Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/Baggage/SetCurrentIntegration.cs
Outdated
Show resolved
Hide resolved
0153117
to
62320db
Compare
722e574
to
e2f7581
Compare
62320db
to
b0660a4
Compare
e2f7581
to
209a6b6
Compare
9b4c1f1
to
bc9c54d
Compare
732746e
to
02c87a4
Compare
02c87a4
to
8b15c1f
Compare
3f8ae7d
to
ee6da69
Compare
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, thanks!!
Merge activity
|
Summary of changes
Add a public API that allows users to access and modify baggage.
Reason for change
Adding support for OpenTelemetry baggage.
Implementation details
Add a static
Baggage
class toDatadog.Trace.Manual
with a singleCurrent
static property:The internal
Baggage
implementsIDictionary<string, string>
, so no duck-typing is required.With IL-rewriting, this property is modified at run time:
Baggage.Current
Baggage
object with the given key/value pairs and sets the internalBaggage.Current
When IL-rewriting is not enabled, this property returns a standard
Dictionary<string, string>
. This will behave the same as the internalBaggage
, but no propagation will occur.Test coverage
Added tests in
Samples.ManualInstrumentation
.