-
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
[Tracing] Send the Datadog-Entity-ID header, containing either the container-id or the cgroup inode if available (AIT-9281) #5058
Conversation
… runs and enhance existing containerID test cases with entityID (with exceptions for now)
…roupv2 and make small fixes so it works as expected.
Datadog ReportBranch report: ✅ 0 Failed, 305760 Passed, 1528 Skipped, 58m 48.68s Wall 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 (5058) - mean (74ms) : 60, 87
. : milestone, 74,
master - mean (71ms) : 61, 80
. : milestone, 71,
section CallTarget+Inlining+NGEN
This PR (5058) - mean (956ms) : 931, 980
. : milestone, 956,
master - mean (947ms) : 927, 968
. : milestone, 947,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5058) - mean (106ms) : 102, 110
. : milestone, 106,
master - mean (106ms) : 102, 110
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (5058) - mean (692ms) : 668, 716
. : milestone, 692,
master - mean (701ms) : 686, 717
. : milestone, 701,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5058) - mean (90ms) : 86, 94
. : milestone, 90,
master - mean (89ms) : 85, 93
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (5058) - mean (648ms) : 629, 666
. : milestone, 648,
master - mean (654ms) : 635, 673
. : milestone, 654,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5058) - mean (188ms) : 186, 191
. : milestone, 188,
master - mean (189ms) : 185, 192
. : milestone, 189,
section CallTarget+Inlining+NGEN
This PR (5058) - mean (1,068ms) : 1041, 1094
. : milestone, 1068,
master - mean (1,067ms) : 1047, 1087
. : milestone, 1067,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5058) - mean (272ms) : 267, 278
. : milestone, 272,
master - mean (272ms) : 267, 278
. : milestone, 272,
section CallTarget+Inlining+NGEN
This PR (5058) - mean (1,049ms) : 1020, 1077
. : milestone, 1049,
master - mean (1,051ms) : 1025, 1078
. : milestone, 1051,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5058) - mean (261ms) : 257, 265
. : milestone, 261,
master - mean (261ms) : 257, 265
. : milestone, 261,
section CallTarget+Inlining+NGEN
This PR (5058) - mean (1,022ms) : 990, 1054
. : milestone, 1022,
master - mean (1,019ms) : 997, 1040
. : milestone, 1019,
|
Throughput/Crank Report:zap: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 (5058) (11.871M) : 0, 11870743
master (11.687M) : 0, 11687402
benchmarks/2.9.0 (11.682M) : 0, 11681575
section Automatic
This PR (5058) (8.152M) : 0, 8151687
master (8.038M) : 0, 8037986
benchmarks/2.9.0 (8.446M) : 0, 8445739
section Trace stats
This PR (5058) (8.489M) : 0, 8489005
master (8.498M) : 0, 8497861
section Manual
This PR (5058) (10.169M) : 0, 10168757
master (10.189M) : 0, 10188958
section Manual + Automatic
This PR (5058) (7.674M) : 0, 7674052
master (7.565M) : 0, 7564964
section Version Conflict
This PR (5058) (6.906M) : 0, 6906228
master (6.895M) : 0, 6895116
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5058) (9.485M) : 0, 9485038
master (9.594M) : 0, 9593979
benchmarks/2.9.0 (9.657M) : 0, 9656830
section Automatic
This PR (5058) (6.637M) : 0, 6637351
master (6.645M) : 0, 6645268
section Trace stats
This PR (5058) (6.724M) : 0, 6723795
master (6.724M) : 0, 6724266
section Manual
This PR (5058) (8.238M) : 0, 8238141
master (8.055M) : 0, 8054730
section Manual + Automatic
This PR (5058) (6.284M) : 0, 6283954
master (6.196M) : 0, 6195700
section Version Conflict
This PR (5058) (5.726M) : 0, 5726239
master (5.584M) : 0, 5584422
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5058) (10.227M) : 0, 10226675
benchmarks/2.9.0 (10.207M) : 0, 10206890
section Automatic
This PR (5058) (7.004M) : 0, 7003619
benchmarks/2.9.0 (7.362M) : 0, 7361712
section Trace stats
This PR (5058) (7.351M) : 0, 7350571
section Manual
This PR (5058) (8.852M) : 0, 8851984
section Manual + Automatic
This PR (5058) (6.851M) : 0, 6850519
section Version Conflict
This PR (5058) (6.138M) : 0, 6138481
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
master (7.151M) : 0, 7151386
benchmarks/2.9.0 (7.448M) : 0, 7447634
section No attack
master (1.704M) : 0, 1704139
benchmarks/2.9.0 (3.135M) : 0, 3134564
section Attack
master (1.374M) : 0, 1374460
benchmarks/2.9.0 (2.468M) : 0, 2467773
section Blocking
master (2.981M) : 0, 2981218
section IAST default
master (6.084M) : 0, 6084230
section IAST full
master (5.330M) : 0, 5329757
section Base vuln
master (0.932M) : 0, 931558
section IAST vuln
master (0.850M) : 0, 850132
|
Benchmarks Report 🐌Benchmarks for #5058 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.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.72 KB | 41.41 KB | -311 B | -0.75% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 554μs | 196ns | 759ns | 0.556 | 0 | 0 | 41.72 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 659μs | 1.82μs | 7.03μs | 0.329 | 0 | 0 | 41.65 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 840μs | 3.5μs | 12.6μs | 8.45 | 2.53 | 0.422 | 53.23 KB |
#5058 | WriteAndFlushEnrichedTraces |
net6.0 | 542μs | 349ns | 1.31μs | 0.532 | 0 | 0 | 41.41 KB |
#5058 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 665μs | 719ns | 2.79μs | 0.331 | 0 | 0 | 41.86 KB |
#5058 | WriteAndFlushEnrichedTraces |
net472 | 845μs | 4μs | 15.5μs | 8.33 | 2.5 | 0.417 | 53.23 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteNonQuery |
net6.0 | 1.1μs | 0.84ns | 3.25ns | 0.0104 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.51μs | 1.01ns | 3.89ns | 0.0106 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
net472 | 1.83μs | 1.36ns | 5.08ns | 0.116 | 0 | 0 | 730 B |
#5058 | ExecuteNonQuery |
net6.0 | 1.12μs | 0.612ns | 2.29ns | 0.0106 | 0 | 0 | 768 B |
#5058 | ExecuteNonQuery |
netcoreapp3.1 | 1.58μs | 0.692ns | 2.68ns | 0.0103 | 0 | 0 | 768 B |
#5058 | ExecuteNonQuery |
net472 | 1.79μs | 5.17ns | 20ns | 0.116 | 0 | 0 | 730 B |
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5058
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0
1.175
1,410.98
1,200.78
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 | 1.175 | 1,410.98 | 1,200.78 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.23μs | 1.41ns | 5.28ns | 0.0128 | 0 | 0 | 936 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.51μs | 0.703ns | 2.63ns | 0.0129 | 0 | 0 | 936 B |
master | CallElasticsearch |
net472 | 2.48μs | 0.801ns | 3.1ns | 0.151 | 0 | 0 | 955 B |
master | CallElasticsearchAsync |
net6.0 | 1.41μs | 1.47ns | 5.68ns | 0.0128 | 0 | 0 | 912 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.79μs | 5.2ns | 18.8ns | 0.013 | 0 | 0 | 984 B |
master | CallElasticsearchAsync |
net472 | 2.78μs | 2.4ns | 8.99ns | 0.16 | 0 | 0 | 1.01 KB |
#5058 | CallElasticsearch |
net6.0 | 1.25μs | 0.316ns | 1.22ns | 0.0132 | 0 | 0 | 936 B |
#5058 | CallElasticsearch |
netcoreapp3.1 | 1.57μs | 1.74ns | 6.74ns | 0.0127 | 0 | 0 | 936 B |
#5058 | CallElasticsearch |
net472 | 2.44μs | 0.939ns | 3.64ns | 0.151 | 0 | 0 | 955 B |
#5058 | CallElasticsearchAsync |
net6.0 | 1.2μs | 0.185ns | 0.669ns | 0.0127 | 0 | 0 | 912 B |
#5058 | CallElasticsearchAsync |
netcoreapp3.1 | 1.64μs | 1.01ns | 3.77ns | 0.0133 | 0 | 0 | 984 B |
#5058 | CallElasticsearchAsync |
net472 | 2.58μs | 0.769ns | 2.88ns | 0.161 | 0 | 0 | 1.01 KB |
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5058
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472
1.126
1,712.34
1,927.57
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 | 1.126 | 1,712.34 | 1,927.57 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.25μs | 3.06ns | 13.3ns | 0.0127 | 0 | 0 | 912 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 2.35ns | 8.78ns | 0.0124 | 0 | 0 | 912 B |
master | ExecuteAsync |
net472 | 1.71μs | 1.12ns | 4.33ns | 0.139 | 0 | 0 | 875 B |
#5058 | ExecuteAsync |
net6.0 | 1.35μs | 0.562ns | 2.1ns | 0.0129 | 0 | 0 | 912 B |
#5058 | ExecuteAsync |
netcoreapp3.1 | 1.63μs | 1.04ns | 4.03ns | 0.0122 | 0 | 0 | 912 B |
#5058 | ExecuteAsync |
net472 | 1.93μs | 1ns | 3.75ns | 0.138 | 0 | 0 | 875 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μs | 1.76ns | 6.83ns | 0.0301 | 0 | 0 | 2.1 KB |
master | SendAsync |
netcoreapp3.1 | 4.95μs | 1.59ns | 5.94ns | 0.0346 | 0 | 0 | 2.63 KB |
master | SendAsync |
net472 | 7.65μs | 3.09ns | 12ns | 0.524 | 0 | 0 | 3.31 KB |
#5058 | SendAsync |
net6.0 | 4.06μs | 1.66ns | 5.99ns | 0.0285 | 0 | 0 | 2.1 KB |
#5058 | SendAsync |
netcoreapp3.1 | 5.1μs | 3.34ns | 12.9ns | 0.0357 | 0 | 0 | 2.63 KB |
#5058 | SendAsync |
net472 | 7.75μs | 3.08ns | 11.5ns | 0.523 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #5058
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
200.89 KB
201.94 KB
1.05 KB
0.52%
Fewer allocations 🎉 in #5058
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
61.25 KB
60.73 KB
-520 B
-0.85%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
214.22 KB
203.53 KB
-10.7 KB
-4.99%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 200.89 KB | 201.94 KB | 1.05 KB | 0.52% |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 61.25 KB | 60.73 KB | -520 B | -0.85% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 214.22 KB | 203.53 KB | -10.7 KB | -4.99% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 60.4μs | 1.01μs | 10μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 53.2μs | 215ns | 745ns | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.6μs | 128ns | 461ns | 0 | 0 | 0 | 61.25 KB |
master | StringConcatAspectBenchmark |
net6.0 | 290μs | 1.99μs | 19.1μs | 0 | 0 | 0 | 214.22 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 284μs | 2.62μs | 24μs | 0 | 0 | 0 | 200.89 KB |
master | StringConcatAspectBenchmark |
net472 | 244μs | 4.02μs | 38.6μs | 0 | 0 | 0 | 221.18 KB |
#5058 | StringConcatBenchmark |
net6.0 | 62.2μs | 693ns | 6.79μs | 0 | 0 | 0 | 43.44 KB |
#5058 | StringConcatBenchmark |
netcoreapp3.1 | 55.1μs | 315ns | 2.25μs | 0 | 0 | 0 | 42.64 KB |
#5058 | StringConcatBenchmark |
net472 | 38μs | 193ns | 904ns | 0 | 0 | 0 | 60.73 KB |
#5058 | StringConcatAspectBenchmark |
net6.0 | 310μs | 9.32μs | 91.8μs | 0 | 0 | 0 | 203.53 KB |
#5058 | StringConcatAspectBenchmark |
netcoreapp3.1 | 271μs | 4.92μs | 46.4μs | 0 | 0 | 0 | 201.94 KB |
#5058 | StringConcatAspectBenchmark |
net472 | 238μs | 3.28μs | 31.4μs | 0 | 0 | 0 | 221.18 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.42μs | 0.512ns | 1.84ns | 0.0221 | 0 | 0 | 1.57 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.25μs | 1.27ns | 4.57ns | 0.0214 | 0 | 0 | 1.57 KB |
master | EnrichedLog |
net472 | 2.74μs | 4.28ns | 16.6ns | 0.237 | 0 | 0 | 1.5 KB |
#5058 | EnrichedLog |
net6.0 | 1.5μs | 0.872ns | 3.38ns | 0.0217 | 0 | 0 | 1.57 KB |
#5058 | EnrichedLog |
netcoreapp3.1 | 2.3μs | 1.24ns | 4.64ns | 0.0207 | 0 | 0 | 1.57 KB |
#5058 | EnrichedLog |
net472 | 2.68μs | 1.82ns | 7.04ns | 0.237 | 0 | 0 | 1.5 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 | 113μs | 116ns | 449ns | 0 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
netcoreapp3.1 | 117μs | 132ns | 511ns | 0.0591 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
net472 | 149μs | 70.7ns | 274ns | 0.668 | 0.223 | 0 | 4.39 KB |
#5058 | EnrichedLog |
net6.0 | 112μs | 71.5ns | 277ns | 0.0558 | 0 | 0 | 4.21 KB |
#5058 | EnrichedLog |
netcoreapp3.1 | 117μs | 117ns | 453ns | 0.0587 | 0 | 0 | 4.21 KB |
#5058 | EnrichedLog |
net472 | 148μs | 148ns | 574ns | 0.661 | 0.22 | 0 | 4.39 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.08μs | 0.662ns | 2.48ns | 0.0293 | 0 | 0 | 2.13 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.19μs | 1.89ns | 7.06ns | 0.0273 | 0 | 0 | 2.13 KB |
master | EnrichedLog |
net472 | 4.87μs | 1.95ns | 7.56ns | 0.308 | 0 | 0 | 1.95 KB |
#5058 | EnrichedLog |
net6.0 | 3.08μs | 0.951ns | 3.68ns | 0.0292 | 0 | 0 | 2.13 KB |
#5058 | EnrichedLog |
netcoreapp3.1 | 4.05μs | 1.18ns | 4.57ns | 0.0283 | 0 | 0 | 2.13 KB |
#5058 | EnrichedLog |
net472 | 4.92μs | 1.2ns | 4.66ns | 0.308 | 0 | 0 | 1.95 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.32μs | 0.554ns | 2.14ns | 0.0152 | 0 | 0 | 1.1 KB |
master | SendReceive |
netcoreapp3.1 | 1.75μs | 0.533ns | 1.99ns | 0.0151 | 0 | 0 | 1.1 KB |
master | SendReceive |
net472 | 2.09μs | 1.52ns | 5.69ns | 0.176 | 0 | 0 | 1.12 KB |
#5058 | SendReceive |
net6.0 | 1.3μs | 0.612ns | 2.37ns | 0.0155 | 0 | 0 | 1.1 KB |
#5058 | SendReceive |
netcoreapp3.1 | 1.69μs | 0.545ns | 2.11ns | 0.0149 | 0 | 0 | 1.1 KB |
#5058 | SendReceive |
net472 | 2.14μs | 1.31ns | 4.73ns | 0.176 | 0 | 0 | 1.12 KB |
Benchmarks.Trace.SerilogBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5058
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0
1.128
2,969.44
2,631.70
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0 | 1.128 | 2,969.44 | 2,631.70 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.97μs | 1.7ns | 6.58ns | 0.0208 | 0 | 0 | 1.53 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.95μs | 1.8ns | 6.97ns | 0.0197 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 4.4μs | 1.91ns | 7.13ns | 0.312 | 0 | 0 | 1.97 KB |
#5058 | EnrichedLog |
net6.0 | 2.63μs | 1.06ns | 3.98ns | 0.0211 | 0 | 0 | 1.53 KB |
#5058 | EnrichedLog |
netcoreapp3.1 | 3.9μs | 1.21ns | 4.69ns | 0.0214 | 0 | 0 | 1.58 KB |
#5058 | EnrichedLog |
net472 | 4.31μs | 1.94ns | 7.5ns | 0.312 | 0 | 0 | 1.97 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5058
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.175
655.77
770.77
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.175 | 655.77 | 770.77 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 514ns | 0.212ns | 0.819ns | 0.00757 | 0 | 0 | 536 B |
master | StartFinishSpan |
netcoreapp3.1 | 656ns | 0.392ns | 1.52ns | 0.00715 | 0 | 0 | 536 B |
master | StartFinishSpan |
net472 | 808ns | 0.203ns | 0.76ns | 0.0853 | 0 | 0 | 538 B |
master | StartFinishScope |
net6.0 | 627ns | 0.208ns | 0.78ns | 0.00899 | 0 | 0 | 656 B |
master | StartFinishScope |
netcoreapp3.1 | 834ns | 0.485ns | 1.88ns | 0.00878 | 0 | 0 | 656 B |
master | StartFinishScope |
net472 | 963ns | 0.429ns | 1.66ns | 0.0979 | 0 | 0 | 618 B |
#5058 | StartFinishSpan |
net6.0 | 520ns | 0.19ns | 0.735ns | 0.00756 | 0 | 0 | 536 B |
#5058 | StartFinishSpan |
netcoreapp3.1 | 767ns | 2.04ns | 7.88ns | 0.00711 | 0 | 0 | 536 B |
#5058 | StartFinishSpan |
net472 | 754ns | 0.269ns | 1.04ns | 0.0852 | 0 | 0 | 538 B |
#5058 | StartFinishScope |
net6.0 | 608ns | 0.2ns | 0.747ns | 0.00934 | 0 | 0 | 656 B |
#5058 | StartFinishScope |
netcoreapp3.1 | 820ns | 0.976ns | 3.78ns | 0.00905 | 0 | 0 | 656 B |
#5058 | StartFinishScope |
net472 | 905ns | 1.29ns | 4.99ns | 0.0978 | 0 | 0 | 618 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5058
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.344
569.26
765.24
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.344 | 569.26 | 765.24 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 569ns | 0.162ns | 0.627ns | 0.00933 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 960ns | 0.758ns | 2.94ns | 0.00871 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
net472 | 1.06μs | 0.363ns | 1.41ns | 0.0978 | 0 | 0 | 618 B |
#5058 | RunOnMethodBegin |
net6.0 | 765ns | 0.311ns | 1.21ns | 0.00924 | 0 | 0 | 656 B |
#5058 | RunOnMethodBegin |
netcoreapp3.1 | 894ns | 2.29ns | 8.88ns | 0.00906 | 0 | 0 | 656 B |
#5058 | RunOnMethodBegin |
net472 | 1.04μs | 0.491ns | 1.9ns | 0.0977 | 0 | 0 | 618 B |
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, just one question about the Process
code 🙂
/// </list> | ||
/// </summary> | ||
/// <returns>The entity id or <c>null</c>.</returns> | ||
public static string GetEntityId() |
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.
nit: Might be nice to sprinkle some #nullable enable
in this file, but obviously not a requirement!
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.
Mm I think I'll keep this file without nullable just to keep this diff easy to read. I'll come back later for this though!
string output = process.StandardOutput.ReadToEnd(); | ||
var isExited = process.WaitForExit(1000); |
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.
I was always struggle to remember, but aren't there race conditions around doing this? 🤔 I thought that was the main reason why our test ProcessHelper
is written the way it is?
EDIT: in fact, we already have a helper for handling this I think, maybe we should extend that instead (to allow changing the timeout, for example)
public static async Task<CommandOutput?> RunCommandAsync(Command command, string? input = null) |
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.
So I created a new overload in ec65d27 to ProcessHelper to keep this synchronous. I wonder what the team will think 👀
tracer/test/Datadog.Trace.Tests/PlatformHelpers/ContainerMetadataTests.cs
Outdated
Show resolved
Hide resolved
- Use Datadog.Trace.AgentHttpHeaderNames constants for Datadog.Trace.Telemetry.TelemetryConstants values - Refactor some of the LINQ in ContainerMetadata.cs - Remove inode filesystem implementation in the test code, use the one in the product code
…ssHelpers.RunCommand, which is a synchronous rewrite of ProcessHelpers.RunCommandAsync
b5794d1
to
ec65d27
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, just an small question.
Summary of changes
This PR sends the
Datadog-Entity-ID
header when theDatadog-Container-Id
header is usually sent, containing either the container-id or the cgroup inode if available.Reason for change
Using the cgroup inode will allow the trace-agent to retrieve the container-id, typically on cgroupv2 without UDS.
Implementation details
This adds a new
Datadog-Entity-ID
header which will also be used for correlating the trace with its running container. The possible values of this are:cid-<container_id>
in-<inode_number>
A couple notes:
Datadog-Container-Id
header is unchangedcgroup
node located at/sys/fs/cgroup{$cgroup_node}
, so this is the target path. To extract the inode, this implementation starts and runs a newstat
process and we parse the output for the number.Test coverage
Datadog.Trace.Tests.PlatformHelpers.ContainerMetadataTests.Parse_Inode_From_Cgroup_File
Datadog.Trace.IntegrationTests.ContainerTaggingTests.Http_Headers_Contain_ContainerId
test caseOther details
N/A