Skip to content
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

Add dot-notation array support for Activity #4943

Closed
wants to merge 8 commits into from

Conversation

bouwkast
Copy link
Contributor

Summary of changes

Adds dot-notation support for tag values that are arrays for Activity/OpenTelemetry.

Reason for change

This is required for ActivityLink/Links support for Activity and will likely come to normal Datadog spans as well.

Implementation details

This essentially unrolls one level of nesting for a tag value. A side-effect of this is that numerical tag values that were arrays will now end up in metrics instead of meta.

Before

foo: ["cat", "dog", "fish"]

After

foo.0: "cat"
foo.1: "dog"
foo.2: "fish"

Only one level of nesting is supported

Before

foo: ["cat", ["dog", ["dog1", "dog2"]], "fish"]

After

foo.0: "cat"
foo.1: ["dog", ["dog1", "dog2"]]
foo.2: "fish"

Test coverage

  • Snapshots for OpenTelemetrySdkTests and NetActivitySdkTests have been updated and show the new format
  • Added some unit tests to increase coverage of the conversion logic from Activity tags to Datadog tags
  • Added some unit tests for unrolling one dimensional arrays.

Other details

Copy link
Contributor

github-actions bot commented Nov 30, 2023

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

2 occurrences of :

-      attribute-boolArray: [false,true,false],
+      attribute-boolArray.0: false,
+      attribute-boolArray.1: true,
+      attribute-boolArray.2: false,
[...]
-      attribute-doubleArray: [4.1,5.0,6.0],
[...]
-      attribute-intArray: [1,2,3],
[...]
-      attribute-stringArray: ["str1","str2","str3"],
+      attribute-stringArray.0: str1,
+      attribute-stringArray.1: str2,
+      attribute-stringArray.2: str3,

2 occurrences of :

-      attribute-int: 1.0
+      attribute-doubleArray.0: 4.1,
+      attribute-doubleArray.1: 5.0,
+      attribute-doubleArray.2: 6.0,
+      attribute-int: 1.0,
+      attribute-intArray.0: 1.0,
+      attribute-intArray.1: 2.0,
+      attribute-intArray.2: 3.0

9 occurrences of :

-      attribute-boolArray: [false,true,false],
+      attribute-boolArray.0: false,
+      attribute-boolArray.1: true,
+      attribute-boolArray.2: false,
[...]
-      attribute-doubleArray: [4.1,5.0,6.0],
[...]
-      attribute-intArray: [1,2,3],
[...]
-      attribute-stringArray: ["\"str1\"","str2","str3"],
+      attribute-stringArray.0: "str1",
+      attribute-stringArray.1: str2,
+      attribute-stringArray.2: str3,

9 occurrences of :

+      attribute-doubleArray.0: 4.1,
+      attribute-doubleArray.1: 5.0,
+      attribute-doubleArray.2: 6.0,
[...]
+      attribute-intArray.0: 1.0,
+      attribute-intArray.1: 2.0,
+      attribute-intArray.2: 3.0,

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 30, 2023

Datadog Report

Branch report: steven/span-links-dot-notation-arrays
Commit report: d496366

dd-trace-dotnet: 13 Failed (0 Known Flaky), 0 New Flaky, 299620 Passed, 921 Skipped, 46m 43.03s Wall Time

❌ Failed Tests (13)

This report shows up to 5 failed tests.

  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.OpenTelemetrySdkTests - Details

    Expand for error
     Results do not match.
     Differences:
     Received: OpenTelemetrySdkTests_up_to_1_5_0_withLegacyOperationName.received.txt
     Verified: OpenTelemetrySdkTests_up_to_1_5_0_withLegacyOperationName.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: MyServiceName.internal,
     ...
    
  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.OpenTelemetrySdkTests - Details

    Expand for error
     Results do not match.
     Differences:
     Received: OpenTelemetrySdkTests_up_to_1_5_0.received.txt
     Verified: OpenTelemetrySdkTests_up_to_1_5_0.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: internal,
     ...
    
  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.OpenTelemetrySdkTests - Details

    Expand for error
     Results do not match.
     Differences:
     Received: OpenTelemetrySdkTests_up_to_1_5_0.received.txt
     Verified: OpenTelemetrySdkTests_up_to_1_5_0.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: internal,
     ...
    
  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.OpenTelemetrySdkTests - Details

    Expand for error
     Results do not match.
     Differences:
     Received: OpenTelemetrySdkTests_up_to_1_5_0_withLegacyOperationName.received.txt
     Verified: OpenTelemetrySdkTests_up_to_1_5_0_withLegacyOperationName.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: MyServiceName.internal,
     ...
    
  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.OpenTelemetrySdkTests - Details

    Expand for error
     Results do not match.
     Differences:
     Received: OpenTelemetrySdkTests_up_to_1_5_0_withLegacyOperationName.received.txt
     Verified: OpenTelemetrySdkTests_up_to_1_5_0_withLegacyOperationName.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: MyServiceName.internal,
     ...
    

@andrewlock
Copy link
Member

andrewlock commented Nov 30, 2023

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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 (4943) - mean (73ms)  : 62, 84
     .   : milestone, 73,
    master - mean (70ms)  : 63, 78
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (4943) - mean (1,021ms)  : 1002, 1039
     .   : milestone, 1021,
    master - mean (1,030ms)  : 1013, 1048
     .   : milestone, 1030,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4943) - mean (106ms)  : 103, 109
     .   : milestone, 106,
    master - mean (106ms)  : 103, 109
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (4943) - mean (733ms)  : 718, 747
     .   : milestone, 733,
    master - mean (736ms)  : 718, 755
     .   : milestone, 736,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4943) - mean (90ms)  : 85, 94
     .   : milestone, 90,
    master - mean (90ms)  : 88, 92
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (4943) - mean (690ms)  : 672, 708
     .   : milestone, 690,
    master - mean (694ms)  : 673, 714
     .   : milestone, 694,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4943) - mean (188ms)  : 186, 191
     .   : milestone, 188,
    master - mean (188ms)  : 186, 190
     .   : milestone, 188,

    section CallTarget+Inlining+NGEN
    This PR (4943) - mean (1,133ms)  : 1112, 1154
     .   : milestone, 1133,
    master - mean (1,132ms)  : 1110, 1154
     .   : milestone, 1132,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4943) - mean (273ms)  : 269, 277
     .   : milestone, 273,
    master - mean (271ms)  : 268, 275
     .   : milestone, 271,

    section CallTarget+Inlining+NGEN
    This PR (4943) - mean (1,093ms)  : 1073, 1112
     .   : milestone, 1093,
    master - mean (1,089ms)  : 1062, 1115
     .   : milestone, 1089,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4943) - mean (262ms)  : 259, 266
     .   : milestone, 262,
    master - mean (261ms)  : 258, 265
     .   : milestone, 261,

    section CallTarget+Inlining+NGEN
    This PR (4943) - mean (1,060ms)  : 1030, 1089
     .   : milestone, 1060,
    master - mean (1,050ms)  : 1029, 1071
     .   : milestone, 1050,

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 30, 2023

Benchmarks Report 🐌

Benchmarks for #4943 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.157
  • 1 benchmarks are slower, with geometric mean 1.167
  • 4 benchmarks have fewer allocations
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Faster 🎉 Fewer allocations 🎉

Faster 🎉 in #4943

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 1.146 8,787.99 7,665.99

Fewer allocations 🎉 in #4943

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 7.95 KB 5.75 KB -2.2 KB -27.68%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 7.57 KB 5.35 KB -2.22 KB -29.32%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 7.48 KB 5.16 KB -2.32 KB -30.99%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.8μs 46ns 234ns 0.0219 0.00876 0 7.48 KB
master StartStopWithChild netcoreapp3.1 10.8μs 58.4ns 330ns 0.0212 0.00529 0 7.57 KB
master StartStopWithChild net472 17.4μs 44.4ns 172ns 1.32 0.333 0.102 7.95 KB
#4943 StartStopWithChild net6.0 7.67μs 42.2ns 260ns 0.014 0.00701 0 5.16 KB
#4943 StartStopWithChild netcoreapp3.1 9.87μs 52.8ns 289ns 0.0142 0.00475 0 5.35 KB
#4943 StartStopWithChild net472 15.7μs 41.4ns 149ns 0.976 0.299 0.0944 5.75 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 445μs 91.7ns 355ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 616μs 284ns 1.1μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 784μs 283ns 1.06μs 0.391 0 0 3.3 KB
#4943 WriteAndFlushEnrichedTraces net6.0 475μs 175ns 679ns 0 0 0 2.7 KB
#4943 WriteAndFlushEnrichedTraces netcoreapp3.1 631μs 361ns 1.4μs 0 0 0 2.7 KB
#4943 WriteAndFlushEnrichedTraces net472 802μs 349ns 1.35μs 0.401 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4943

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑netcoreapp3.1 1.175 241.00 205.10

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 38.4μs 20.9ns 80.9ns 0.0191 0 0 1.77 KB
master AllCycleSimpleBody netcoreapp3.1 41.9μs 99.6ns 386ns 0.0208 0 0 1.74 KB
master AllCycleSimpleBody net472 44.8μs 17.1ns 66.1ns 0.268 0 0 1.81 KB
master AllCycleMoreComplexBody net6.0 200μs 72ns 279ns 0.099 0 0 9.25 KB
master AllCycleMoreComplexBody netcoreapp3.1 216μs 453ns 1.75μs 0.105 0 0 9.14 KB
master AllCycleMoreComplexBody net472 226μs 137ns 531ns 1.45 0 0 9.32 KB
master ObjectExtractorSimpleBody net6.0 143ns 0.052ns 0.201ns 0.00396 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 244ns 0.947ns 3.67ns 0.00372 0 0 272 B
master ObjectExtractorSimpleBody net472 168ns 0.0685ns 0.265ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3μs 1.18ns 4.56ns 0.0525 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.12μs 1.47ns 5.52ns 0.0495 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.79μs 2.79ns 10.8ns 0.601 0.00569 0 3.8 KB
#4943 AllCycleSimpleBody net6.0 37.7μs 29.7ns 115ns 0.0189 0 0 1.77 KB
#4943 AllCycleSimpleBody netcoreapp3.1 41.7μs 47.2ns 183ns 0.0209 0 0 1.74 KB
#4943 AllCycleSimpleBody net472 44.7μs 58.4ns 226ns 0.286 0 0 1.81 KB
#4943 AllCycleMoreComplexBody net6.0 198μs 102ns 394ns 0.1 0 0 9.25 KB
#4943 AllCycleMoreComplexBody netcoreapp3.1 210μs 215ns 833ns 0.106 0 0 9.14 KB
#4943 AllCycleMoreComplexBody net472 227μs 78.4ns 293ns 1.47 0 0 9.32 KB
#4943 ObjectExtractorSimpleBody net6.0 151ns 0.0517ns 0.193ns 0.00394 0 0 280 B
#4943 ObjectExtractorSimpleBody netcoreapp3.1 205ns 0.158ns 0.613ns 0.00361 0 0 272 B
#4943 ObjectExtractorSimpleBody net472 167ns 0.0773ns 0.299ns 0.0446 0 0 281 B
#4943 ObjectExtractorMoreComplexBody net6.0 3.12μs 1.74ns 6.5ns 0.0532 0 0 3.78 KB
#4943 ObjectExtractorMoreComplexBody netcoreapp3.1 3.92μs 1.5ns 5.79ns 0.049 0 0 3.69 KB
#4943 ObjectExtractorMoreComplexBody net472 3.77μs 1.28ns 4.79ns 0.603 0.00565 0 3.8 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWaf(args=NestedMap (10)) net6.0 51.4μs 30.7ns 111ns 0.206 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) netcoreapp3.1 71.9μs 393ns 2.19μs 0.196 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) net472 95.4μs 42.3ns 164ns 2.52 0.0952 0 16.14 KB
master RunWafTwice(args=NestedMap (10)) net6.0 55μs 307ns 1.89μs 0.22 0 0 16.6 KB
master RunWafTwice(args=NestedMap (10)) netcoreapp3.1 73.4μs 393ns 2.19μs 0.187 0 0 16.58 KB
master RunWafTwice(args=NestedMap (10)) net472 105μs 127ns 492ns 2.61 0.104 0 16.69 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 115μs 70.1ns 271ns 0.272 0 0 22.41 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 131μs 188ns 677ns 0.26 0 0 22.36 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 159μs 63.8ns 239ns 3.58 0.159 0 22.7 KB
master RunWaf(args=NestedMap (100)) net6.0 112μs 158ns 611ns 0.455 0 0 32.76 KB
master RunWaf(args=NestedMap (100)) netcoreapp3.1 138μs 686ns 2.91μs 0.445 0 0 33.33 KB
master RunWaf(args=NestedMap (100)) net472 185μs 152ns 587ns 5.27 0.37 0 33.67 KB
master RunWafTwice(args=NestedMap (100)) net6.0 110μs 319ns 1.23μs 0.469 0 0 33.3 KB
master RunWafTwice(args=NestedMap (100)) netcoreapp3.1 140μs 696ns 3.11μs 0.412 0 0 33.86 KB
master RunWafTwice(args=NestedMap (100)) net472 194μs 211ns 819ns 5.4 0.386 0 34.22 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 165μs 595ns 2.31μs 0.498 0 0 39.1 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 198μs 968ns 4.11μs 0.499 0 0 39.63 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net472 258μs 106ns 382ns 6.3 0.514 0 40.23 KB
master RunWaf(args=NestedMap (20)) net6.0 98μs 40.5ns 140ns 0.442 0 0 32.18 KB
master RunWaf(args=NestedMap (20)) netcoreapp3.1 130μs 658ns 3.09μs 0.389 0 0 32.3 KB
master RunWaf(args=NestedMap (20)) net472 186μs 61.1ns 220ns 5.19 0.37 0 32.63 KB
master RunWafTwice(args=NestedMap (20)) net6.0 103μs 37.1ns 134ns 0.423 0 0 32.72 KB
master RunWafTwice(args=NestedMap (20)) netcoreapp3.1 136μs 684ns 3.06μs 0.418 0 0 32.82 KB
master RunWafTwice(args=NestedMap (20)) net472 193μs 50.2ns 181ns 5.22 0.386 0 33.19 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 174μs 554ns 2.15μs 0.48 0 0 38.53 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 201μs 515ns 1.93μs 0.506 0 0 38.6 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 256μs 1.13μs 4.37μs 6.16 0.503 0 39.2 KB
#4943 RunWaf(args=NestedMap (10)) net6.0 55.6μs 20.1ns 78ns 0.223 0 0 16.06 KB
#4943 RunWaf(args=NestedMap (10)) netcoreapp3.1 69.7μs 393ns 2.55μs 0.21 0 0 16.06 KB
#4943 RunWaf(args=NestedMap (10)) net472 100μs 37.8ns 147ns 2.54 0.0959 0 16.14 KB
#4943 RunWafTwice(args=NestedMap (10)) net6.0 55.1μs 18.4ns 78ns 0.235 0 0 16.6 KB
#4943 RunWafTwice(args=NestedMap (10)) netcoreapp3.1 72.3μs 406ns 2.6μs 0.209 0 0 16.58 KB
#4943 RunWafTwice(args=NestedMap (10)) net472 103μs 29.6ns 111ns 2.63 0.103 0 16.69 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 120μs 58.7ns 227ns 0.271 0 0 22.41 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 129μs 204ns 736ns 0.265 0 0 22.36 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [22]) net472 163μs 212ns 822ns 3.58 0.159 0 22.7 KB
#4943 RunWaf(args=NestedMap (100)) net6.0 106μs 619ns 5.77μs 0.441 0 0 32.76 KB
#4943 RunWaf(args=NestedMap (100)) netcoreapp3.1 135μs 746ns 4.66μs 0.408 0 0 33.33 KB
#4943 RunWaf(args=NestedMap (100)) net472 187μs 75.7ns 293ns 5.32 0.373 0 33.67 KB
#4943 RunWafTwice(args=NestedMap (100)) net6.0 113μs 165ns 640ns 0.452 0 0 33.3 KB
#4943 RunWafTwice(args=NestedMap (100)) netcoreapp3.1 137μs 735ns 3.75μs 0.462 0 0 33.86 KB
#4943 RunWafTwice(args=NestedMap (100)) net472 197μs 934ns 3.62μs 5.41 0.386 0 34.22 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 159μs 59.2ns 214ns 0.556 0 0 39.1 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 204μs 1.01μs 4.41μs 0.485 0 0 39.63 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [23]) net472 255μs 101ns 390ns 6.34 0.507 0 40.23 KB
#4943 RunWaf(args=NestedMap (20)) net6.0 106μs 55ns 213ns 0.423 0 0 32.18 KB
#4943 RunWaf(args=NestedMap (20)) netcoreapp3.1 131μs 709ns 4.01μs 0.389 0 0 32.3 KB
#4943 RunWaf(args=NestedMap (20)) net472 184μs 52.3ns 202ns 5.15 0.368 0 32.63 KB
#4943 RunWafTwice(args=NestedMap (20)) net6.0 105μs 213ns 826ns 0.445 0 0 32.72 KB
#4943 RunWafTwice(args=NestedMap (20)) netcoreapp3.1 137μs 751ns 4.25μs 0.427 0 0 32.82 KB
#4943 RunWafTwice(args=NestedMap (20)) net472 194μs 928ns 3.6μs 5.18 0.384 0 33.19 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 165μs 803ns 3.59μs 0.502 0 0 38.53 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 200μs 992ns 4.44μs 0.479 0 0 38.6 KB
#4943 RunWafWithAttack(args=Neste(...)tack) [22]) net472 253μs 90.5ns 350ns 6.2 0.506 0 39.2 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 172μs 100ns 375ns 0.174 0 0 18.25 KB
master SendRequest netcoreapp3.1 194μs 461ns 1.79μs 0.193 0 0 20.41 KB
master SendRequest net472 0.00119ns 0.000285ns 0.0011ns 0 0 0 0 b
#4943 SendRequest net6.0 173μs 207ns 801ns 0.174 0 0 18.25 KB
#4943 SendRequest netcoreapp3.1 195μs 375ns 1.45μs 0.195 0 0 20.41 KB
#4943 SendRequest net472 0.000818ns 0.00025ns 0.000936ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #4943

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.49 KB 41.85 KB 356 B 0.86%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 538μs 322ns 1.16μs 0.558 0 0 41.49 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 673μs 1.06μs 4.11μs 0.334 0 0 41.74 KB
master WriteAndFlushEnrichedTraces net472 846μs 2.71μs 10.5μs 8.28 2.48 0.414 53.23 KB
#4943 WriteAndFlushEnrichedTraces net6.0 548μs 848ns 3.17μs 0.543 0 0 41.85 KB
#4943 WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 1.65μs 6.39μs 0.327 0 0 41.63 KB
#4943 WriteAndFlushEnrichedTraces net472 854μs 3.14μs 12.2μs 8.19 2.59 0.431 53.22 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.07μs 0.392ns 1.52ns 0.011 0 0 768 B
master ExecuteNonQuery netcoreapp3.1 1.45μs 0.609ns 2.36ns 0.0102 0 0 768 B
master ExecuteNonQuery net472 1.72μs 0.523ns 2.02ns 0.116 0 0 730 B
#4943 ExecuteNonQuery net6.0 1.1μs 0.773ns 2.99ns 0.0109 0 0 768 B
#4943 ExecuteNonQuery netcoreapp3.1 1.53μs 0.577ns 2.23ns 0.00995 0 0 768 B
#4943 ExecuteNonQuery net472 1.77μs 0.698ns 2.52ns 0.116 0 0 730 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.22μs 0.771ns 2.99ns 0.0129 0 0 936 B
master CallElasticsearch netcoreapp3.1 1.47μs 1.81ns 6.78ns 0.0126 0 0 936 B
master CallElasticsearch net472 2.44μs 0.776ns 3ns 0.151 0 0 955 B
master CallElasticsearchAsync net6.0 1.33μs 0.425ns 1.65ns 0.0127 0 0 912 B
master CallElasticsearchAsync netcoreapp3.1 1.64μs 0.712ns 2.76ns 0.0131 0 0 984 B
master CallElasticsearchAsync net472 2.57μs 1.53ns 5.94ns 0.16 0.00129 0 1.01 KB
#4943 CallElasticsearch net6.0 1.19μs 0.79ns 2.95ns 0.0132 0 0 936 B
#4943 CallElasticsearch netcoreapp3.1 1.53μs 0.501ns 1.94ns 0.0124 0 0 936 B
#4943 CallElasticsearch net472 2.4μs 0.601ns 2.33ns 0.151 0 0 955 B
#4943 CallElasticsearchAsync net6.0 1.27μs 1.24ns 4.79ns 0.0129 0 0 912 B
#4943 CallElasticsearchAsync netcoreapp3.1 1.54μs 0.881ns 3.41ns 0.0132 0 0 984 B
#4943 CallElasticsearchAsync net472 2.62μs 0.688ns 2.66ns 0.16 0 0 1.01 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.28μs 0.78ns 2.92ns 0.0128 0 0 912 B
master ExecuteAsync netcoreapp3.1 1.7μs 1.86ns 7.22ns 0.0119 0 0 912 B
master ExecuteAsync net472 1.82μs 1.04ns 3.88ns 0.138 0 0 875 B
#4943 ExecuteAsync net6.0 1.36μs 0.536ns 2.08ns 0.013 0 0 912 B
#4943 ExecuteAsync netcoreapp3.1 1.7μs 0.532ns 1.99ns 0.0119 0 0 912 B
#4943 ExecuteAsync net472 1.88μs 0.725ns 2.81ns 0.139 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.11μs 1.81ns 6.78ns 0.0289 0 0 2.1 KB
master SendAsync netcoreapp3.1 4.99μs 2.29ns 8.55ns 0.035 0 0 2.63 KB
master SendAsync net472 7.82μs 4.25ns 16.5ns 0.522 0 0 3.31 KB
#4943 SendAsync net6.0 4.09μs 2.12ns 7.93ns 0.0292 0 0 2.1 KB
#4943 SendAsync netcoreapp3.1 5.14μs 2.02ns 7.57ns 0.036 0 0 2.63 KB
#4943 SendAsync net472 7.75μs 3.79ns 14.7ns 0.524 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #4943

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark(parameters: System.Collections.Generic.List`1[System.String])‑net472 61.39 KB 59.81 KB -1.58 KB -2.58%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 52.1μs 238ns 859ns 0 0 0 43.44 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 53μs 254ns 986ns 0 0 0 42.64 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 37.6μs 94.8ns 342ns 0 0 0 61.39 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 99.1μs 2.71μs 27μs 0 0 0 43.29 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 102μs 3.12μs 31.1μs 0 0 0 42.64 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 63μs 232ns 866ns 0 0 0 57.34 KB
#4943 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 59.6μs 766ns 7.5μs 0 0 0 43.44 KB
#4943 StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 52.7μs 271ns 1.3μs 0 0 0 42.64 KB
#4943 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 37.9μs 96ns 333ns 0 0 0 59.81 KB
#4943 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 96.1μs 2.69μs 26.9μs 0 0 0 43.29 KB
#4943 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 104μs 3.63μs 35.9μs 0 0 0 42.64 KB
#4943 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 63.7μs 108ns 402ns 0 0 0 57.34 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.46μs 0.529ns 1.98ns 0.0219 0 0 1.57 KB
master EnrichedLog netcoreapp3.1 2.2μs 3.61ns 13ns 0.0217 0 0 1.57 KB
master EnrichedLog net472 2.6μs 4.04ns 15.1ns 0.238 0 0 1.5 KB
#4943 EnrichedLog net6.0 1.46μs 0.501ns 1.87ns 0.0219 0 0 1.57 KB
#4943 EnrichedLog netcoreapp3.1 2.24μs 0.75ns 2.7ns 0.0212 0 0 1.57 KB
#4943 EnrichedLog net472 2.71μs 2.04ns 7.37ns 0.238 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 114ns 440ns 0.0564 0 0 4.21 KB
master EnrichedLog netcoreapp3.1 119μs 38.7ns 134ns 0 0 0 4.21 KB
master EnrichedLog net472 149μs 81.3ns 304ns 0.668 0.223 0 4.39 KB
#4943 EnrichedLog net6.0 114μs 213ns 797ns 0.0561 0 0 4.21 KB
#4943 EnrichedLog netcoreapp3.1 118μs 118ns 441ns 0 0 0 4.21 KB
#4943 EnrichedLog net472 148μs 149ns 579ns 0.664 0.221 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.11μs 0.858ns 3.32ns 0.0296 0 0 2.13 KB
master EnrichedLog netcoreapp3.1 4.37μs 2.35ns 9.1ns 0.028 0 0 2.13 KB
master EnrichedLog net472 4.8μs 2.04ns 7.92ns 0.309 0 0 1.95 KB
#4943 EnrichedLog net6.0 3.09μs 1.06ns 4.11ns 0.0291 0 0 2.13 KB
#4943 EnrichedLog netcoreapp3.1 4.2μs 1.71ns 6.4ns 0.0292 0 0 2.13 KB
#4943 EnrichedLog net472 4.93μs 2.66ns 10.3ns 0.309 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.35μs 4.57ns 17.7ns 0.0158 0 0 1.1 KB
master SendReceive netcoreapp3.1 1.84μs 2.26ns 8.76ns 0.0144 0 0 1.1 KB
master SendReceive net472 2.2μs 3.84ns 14.9ns 0.177 0 0 1.12 KB
#4943 SendReceive net6.0 1.45μs 1.14ns 4.42ns 0.0154 0 0 1.1 KB
#4943 SendReceive netcoreapp3.1 1.71μs 0.85ns 3.29ns 0.0148 0 0 1.1 KB
#4943 SendReceive net472 2.04μs 1.61ns 6.22ns 0.176 0 0 1.12 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.81μs 6.38ns 24.7ns 0.0207 0 0 1.53 KB
master EnrichedLog netcoreapp3.1 3.86μs 1.45ns 5.41ns 0.0213 0 0 1.58 KB
master EnrichedLog net472 4.39μs 1.22ns 4.39ns 0.31 0 0 1.97 KB
#4943 EnrichedLog net6.0 2.76μs 0.956ns 3.58ns 0.0208 0 0 1.53 KB
#4943 EnrichedLog netcoreapp3.1 3.92μs 1.36ns 4.91ns 0.0197 0 0 1.58 KB
#4943 EnrichedLog net472 4.31μs 1.38ns 5.35ns 0.311 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #4943

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.167 463.86 541.23

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 464ns 0.112ns 0.404ns 0.00742 0 0 536 B
master StartFinishSpan netcoreapp3.1 745ns 0.302ns 1.17ns 0.00715 0 0 536 B
master StartFinishSpan net472 781ns 0.199ns 0.771ns 0.0854 0 0 538 B
master StartFinishScope net6.0 595ns 0.371ns 1.44ns 0.00902 0 0 656 B
master StartFinishScope netcoreapp3.1 831ns 0.907ns 3.51ns 0.00881 0 0 656 B
master StartFinishScope net472 973ns 0.399ns 1.49ns 0.098 0 0 618 B
#4943 StartFinishSpan net6.0 541ns 0.188ns 0.728ns 0.00753 0 0 536 B
#4943 StartFinishSpan netcoreapp3.1 714ns 0.334ns 1.25ns 0.00735 0 0 536 B
#4943 StartFinishSpan net472 824ns 0.537ns 2.08ns 0.0851 0 0 538 B
#4943 StartFinishScope net6.0 612ns 0.215ns 0.833ns 0.00919 0 0 656 B
#4943 StartFinishScope netcoreapp3.1 764ns 0.31ns 1.16ns 0.00878 0 0 656 B
#4943 StartFinishScope net472 934ns 0.586ns 2.27ns 0.0977 0 0 618 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4943

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 1.148 1,116.34 972.16

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 630ns 0.231ns 0.894ns 0.00926 0 0 656 B
master RunOnMethodBegin netcoreapp3.1 902ns 0.288ns 1.08ns 0.00889 0 0 656 B
master RunOnMethodBegin net472 1.12μs 0.394ns 1.53ns 0.0977 0 0 618 B
#4943 RunOnMethodBegin net6.0 699ns 0.48ns 1.86ns 0.00898 0 0 656 B
#4943 RunOnMethodBegin netcoreapp3.1 921ns 0.277ns 1.04ns 0.00884 0 0 656 B
#4943 RunOnMethodBegin net472 973ns 0.375ns 1.45ns 0.0982 0 0 618 B

@bouwkast bouwkast force-pushed the steven/span-links-dot-notation-arrays branch from d496366 to a19e666 Compare January 5, 2024 21:02
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 5, 2024

Datadog Report

Branch report: steven/span-links-dot-notation-arrays
Commit report: 0eb0ddc
Test service: dd-trace-dotnet

❌ 2 Failed (0 Known Flaky), 302359 Passed, 996 Skipped, 31m 3.19s Wall Time

❌ Failed Tests (2)

  • GraphQL2SchemaV0Tests.SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests - Details

    Expand for error
     Address not available Address not available
     ---- System.Net.Http.HttpRequestException : Address not available
     -------- System.Net.Sockets.SocketException : Address not available
    
  • SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.GraphQL2SchemaV1Tests - Details

    Expand for error
     Address not available Address not available
     ---- System.Net.Http.HttpRequestException : Address not available
     -------- System.Net.Sockets.SocketException : Address not available
    

@andrewlock
Copy link
Member

andrewlock commented Jan 5, 2024

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 (4943) (11.548M)   : 0, 11547914
    master (11.632M)   : 0, 11631618
    benchmarks/2.9.0 (11.757M)   : 0, 11756801

    section Automatic
    This PR (4943) (7.864M)   : 0, 7863624
    master (8.011M)   : 0, 8010820
    benchmarks/2.9.0 (8.573M)   : 0, 8573327

    section Trace stats
    This PR (4943) (8.154M)   : 0, 8154123
    master (8.335M)   : 0, 8335191

    section Manual
    This PR (4943) (9.951M)   : 0, 9950906
    master (10.240M)   : 0, 10240464

    section Manual + Automatic
    This PR (4943) (7.393M)   : 0, 7392640
    master (7.615M)   : 0, 7614917

    section Version Conflict
    This PR (4943) (6.854M)   : 0, 6854299
    master (6.860M)   : 0, 6859931

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4943) (9.697M)   : 0, 9696833
    master (9.594M)   : 0, 9594448
    benchmarks/2.9.0 (9.605M)   : 0, 9605360

    section Automatic
    This PR (4943) (6.704M)   : 0, 6704095
    master (6.570M)   : 0, 6569521

    section Trace stats
    This PR (4943) (7.006M)   : 0, 7005811
    master (6.865M)   : 0, 6865257

    section Manual
    This PR (4943) (8.363M)   : 0, 8362897
    master (8.346M)   : 0, 8345546

    section Manual + Automatic
    This PR (4943) (6.256M)   : 0, 6255657
    master (6.111M)   : 0, 6110796

    section Version Conflict
    This PR (4943) (5.727M)   : 0, 5726621
    master (5.680M)   : 0, 5679792

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4943) (10.390M)   : 0, 10389510
    master (10.186M)   : 0, 10186222
    benchmarks/2.9.0 (9.956M)   : 0, 9956027

    section Automatic
    This PR (4943) (7.105M)   : 0, 7104702
    master (7.005M)   : 0, 7005346
    benchmarks/2.9.0 (7.438M)   : 0, 7437608

    section Trace stats
    This PR (4943) (7.472M)   : 0, 7471649
    master (7.461M)   : 0, 7461480

    section Manual
    This PR (4943) (8.900M)   : 0, 8899514
    master (8.893M)   : 0, 8893402

    section Manual + Automatic
    This PR (4943) (6.920M)   : 0, 6920455
    master (6.733M)   : 0, 6733115

    section Version Conflict
    This PR (4943) (6.110M)   : 0, 6109677
    master (6.183M)   : 0, 6183301

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    master (7.421M)   : 0, 7421031
    benchmarks/2.9.0 (7.813M)   : 0, 7813475

    section No attack
    master (1.758M)   : 0, 1758315
    benchmarks/2.9.0 (3.251M)   : 0, 3251456

    section Attack
    master (1.406M)   : 0, 1405570
    benchmarks/2.9.0 (2.577M)   : 0, 2577462

    section Blocking
    master (3.114M)   : 0, 3114389

    section IAST default
    master (6.585M)   : 0, 6584825

    section IAST full
    master (5.824M)   : 0, 5824226

    section Base vuln
    master (0.971M)   : 0, 971422

    section IAST vuln
    master (0.888M)   : 0, 888441

Loading

@bouwkast bouwkast force-pushed the steven/span-links-dot-notation-arrays branch from a19e666 to 01b7c7d Compare January 10, 2024 20:27
@bouwkast
Copy link
Contributor Author

Done in #5627

@bouwkast bouwkast closed this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants