Skip to content

Add scope property to UserDetails#2706

Merged
robertpi merged 2 commits into
masterfrom
appsec/robert/correct-user-details-new
Apr 21, 2022
Merged

Add scope property to UserDetails#2706
robertpi merged 2 commits into
masterfrom
appsec/robert/correct-user-details-new

Conversation

@robertpi

@robertpi robertpi commented Apr 20, 2022

Copy link
Copy Markdown
Member

Summary of changes

Add scope tag to UserDetails object.

Reason for change

Overlooked this property in #2546.

@robertpi
robertpi requested a review from a team as a code owner April 20, 2022 13:03
@andrewlock

This comment has been minimized.

@robertpi
robertpi force-pushed the appsec/robert/correct-user-details-new branch from a77b03f to 7ec83e3 Compare April 20, 2022 16:31
@andrewlock

Copy link
Copy Markdown
Member

Code Coverage Report 📊

✔️ Merging #2706 into master will not change line coverage
✔️ Merging #2706 into master will not change branch coverage
⛔ Merging #2706 into master will will increase complexity by 127

master #2706 Change
Lines 13549 / 18651 13684 / 18866
Lines % 73% 73% 0% ✔️
Branches 7821 / 11131 7901 / 11261
Branches % 70% 70% 0% ✔️
Complexity 12416 12543 127

View the full report for further details:

Datadog.Trace Breakdown ✔️

master #2706 Change
Lines % 73% 73% 0% ✔️
Branches % 70% 70% 0% ✔️
Complexity 12416 12543 127

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.ClrProfiler.AutoInstrumentation.Testing.MsTestV2.TestMethodRunnerExecuteIntegration -23% -10% 0 ✔️
Datadog.Trace.ClrProfiler.AutoInstrumentation.Testing.MsTestV2.MsTestIntegration -20% -23% 36
Datadog.Trace.ClrProfiler.AutoInstrumentation.Testing.MsTestV2.UnitTestRunnerRunSingleTestIntegration -19% -9% 0 ✔️
Datadog.Trace.Ci.Configuration.CIVisibilitySettings -16% -10% 1
Datadog.Trace.ClrProfiler.AutoInstrumentation.Testing.XUnit.XUnitIntegration -13% -20% 6
Datadog.Trace.ClrProfiler.AutoInstrumentation.Testing.NUnit.NUnitIntegration -9% -18% 8
Datadog.Trace.ClrProfiler.AutoInstrumentation.Testing.MsTestV2.TestMethodAttributeExecuteIntegration -6% -5% 0 ✔️
Datadog.Trace.ClrProfiler.NativeMethods 2% ✔️ 9% ✔️ 6
Datadog.Trace.Ci.GitInfo 5% ✔️ 7% ✔️ 0 ✔️
Datadog.Trace.ClrProfiler.AutoInstrumentation.TraceAnnotations.TraceAnnotationInfoFactory 5% ✔️ 31% ✔️ 15
...And 3 more

The following classes were added in #2706:

File Line coverage Branch coverage Complexity
Datadog.Trace.Ci.Coverage.Attributes.CoveredAssemblyAttribute 100% 100% 1
Datadog.Trace.Ci.Coverage.CoverageContextContainer 100% 100% 4
Datadog.Trace.Ci.Coverage.CoverageEventHandler 100% 100% 12
Datadog.Trace.Ci.Coverage.CoverageInstruction 100% 100% 1
Datadog.Trace.Ci.Coverage.CoverageReporter 100% 100% 5
...And 3 more

View the full reports for further details:

@robertpi
robertpi merged commit f74af6a into master Apr 21, 2022
@robertpi
robertpi deleted the appsec/robert/correct-user-details-new branch April 21, 2022 04:34
@github-actions github-actions Bot added this to the vNext milestone Apr 21, 2022
@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report 🐌

Benchmarks for #2706 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.147
  • 1 benchmarks are slower, with geometric mean 1.141
  • All benchmarks have the same 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.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 947μs 4.93μs 24.7μs 0 0 0 3.16 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 738μs 3.8μs 19μs 0 0 0 2.57 KB
#2706 WriteAndFlushEnrichedTraces net472 980μs 4.03μs 15.1μs 0 0 0 3.16 KB
#2706 WriteAndFlushEnrichedTraces netcoreapp3.1 699μs 3.85μs 22.1μs 0 0 0 2.57 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 329ns 1.63ns 7.46ns 0.066 0 0 417 B
master AllCycleSimpleBody netcoreapp3.1 425ns 2.39ns 15.7ns 0.00556 0 0 416 B
master AllCycleMoreComplexBody net472 319ns 1.81ns 13.1ns 0.0622 0 0 393 B
master AllCycleMoreComplexBody netcoreapp3.1 407ns 2.11ns 12.3ns 0.00532 0 0 392 B
master BodyExtractorSimpleBody net472 453ns 2.55ns 16.7ns 0.0569 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 431ns 1.39ns 5.19ns 0.0039 0 0 272 B
master BodyExtractorMoreComplexBody net472 24.5μs 113ns 423ns 1.18 0.0131 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 21.8μs 119ns 735ns 0.0946 0 0 6.75 KB
#2706 AllCycleSimpleBody net472 326ns 1.87ns 14.4ns 0.066 0 0 417 B
#2706 AllCycleSimpleBody netcoreapp3.1 412ns 1.24ns 4.3ns 0.00567 0 0 416 B
#2706 AllCycleMoreComplexBody net472 310ns 1.44ns 5.75ns 0.0622 0 0 393 B
#2706 AllCycleMoreComplexBody netcoreapp3.1 403ns 1.7ns 6.15ns 0.00546 0 0 392 B
#2706 BodyExtractorSimpleBody net472 440ns 1.87ns 7.47ns 0.057 0 0 361 B
#2706 BodyExtractorSimpleBody netcoreapp3.1 446ns 2.09ns 8.38ns 0.00372 0 0 272 B
#2706 BodyExtractorMoreComplexBody net472 23.8μs 110ns 441ns 1.19 0.0118 0 7.62 KB
#2706 BodyExtractorMoreComplexBody netcoreapp3.1 21μs 70.4ns 254ns 0.0866 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 294μs 1.44μs 5.76μs 0.145 0 0 19.74 KB
#2706 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#2706 SendRequest netcoreapp3.1 287μs 1.28μs 4.63μs 0.148 0 0 19.74 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 net472 1.86μs 8.06ns 27.9ns 0.0936 0.000918 0 594 B
master ExecuteNonQuery netcoreapp3.1 1.56μs 8.18ns 43.3ns 0.00825 0 0 632 B
#2706 ExecuteNonQuery net472 1.76μs 9.13ns 51.7ns 0.0938 0.000861 0 594 B
#2706 ExecuteNonQuery netcoreapp3.1 1.52μs 6.69ns 25.9ns 0.00883 0 0 632 B
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #2706

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 1.136 3,191.92 2,809.24

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net472 3.11μs 16.5ns 82.6ns 0.127 0 0 803 B
master CallElasticsearch netcoreapp3.1 1.85μs 9.87ns 68.3ns 0.0109 0 0 792 B
master CallElasticsearchAsync net472 3.17μs 16.6ns 77.9ns 0.149 0.00149 0 939 B
master CallElasticsearchAsync netcoreapp3.1 1.92μs 10.6ns 62.9ns 0.0123 0 0 912 B
#2706 CallElasticsearch net472 3.04μs 17.3ns 126ns 0.125 0 0 802 B
#2706 CallElasticsearch netcoreapp3.1 1.73μs 8.7ns 42.6ns 0.0109 0 0 792 B
#2706 CallElasticsearchAsync net472 2.81μs 14.5ns 66.3ns 0.148 0 0 939 B
#2706 CallElasticsearchAsync netcoreapp3.1 1.82μs 7.89ns 43.2ns 0.012 0 0 912 B
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #2706

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 1.141 3,106.60 3,544.68

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 3.1μs 15.8ns 72.5ns 0.168 0.00151 0 1.06 KB
master ExecuteAsync netcoreapp3.1 2.1μs 11.4ns 60.3ns 0.0138 0 0 1.03 KB
#2706 ExecuteAsync net472 3.56μs 17.9ns 82ns 0.168 0.00176 0 1.06 KB
#2706 ExecuteAsync netcoreapp3.1 2.05μs 7.99ns 32ns 0.0143 0 0 1.03 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 6.69μs 29.2ns 113ns 0.361 0 0 2.28 KB
master SendAsync netcoreapp3.1 5.06μs 23.5ns 99.5ns 0.031 0 0 2.21 KB
#2706 SendAsync net472 7.1μs 34.8ns 152ns 0.359 0 0 2.28 KB
#2706 SendAsync netcoreapp3.1 4.83μs 18.9ns 73.1ns 0.0317 0 0 2.21 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 net472 3.51μs 14.7ns 65.7ns 0.226 0 0 1.45 KB
master EnrichedLog netcoreapp3.1 3.12μs 10.4ns 40.2ns 0.0216 0 0 1.53 KB
#2706 EnrichedLog net472 3.36μs 17.6ns 82.4ns 0.228 0 0 1.45 KB
#2706 EnrichedLog netcoreapp3.1 3.09μs 15.9ns 73.1ns 0.021 0 0 1.53 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 net472 285μs 1.35μs 5.56μs 0.434 0.145 0 4.33 KB
master EnrichedLog netcoreapp3.1 231μs 1.23μs 6.6μs 0 0 0 4.21 KB
#2706 EnrichedLog net472 283μs 1.15μs 4.46μs 0.422 0.141 0 4.33 KB
#2706 EnrichedLog netcoreapp3.1 233μs 1.17μs 5.25μs 0 0 0 4.21 KB
Benchmarks.Trace.NLogBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #2706

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 1.157 9,021.53 7,797.99

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 9.02μs 50.1ns 321ns 0.502 0 0 3.23 KB
master EnrichedLog netcoreapp3.1 6.6μs 36.3ns 224ns 0.0503 0 0 3.6 KB
#2706 EnrichedLog net472 7.81μs 40.3ns 201ns 0.505 0 0 3.23 KB
#2706 EnrichedLog netcoreapp3.1 6.55μs 31ns 120ns 0.0506 0 0 3.6 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 net472 2.37μs 8.2ns 30.7ns 0.16 0 0 1.01 KB
master SendReceive netcoreapp3.1 2.17μs 10.4ns 44ns 0.0138 0 0 1.01 KB
#2706 SendReceive net472 2.37μs 11.5ns 48.7ns 0.16 0 0 1.01 KB
#2706 SendReceive netcoreapp3.1 2.22μs 10.2ns 38.3ns 0.0145 0 0 1.01 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 net472 6.09μs 33.9ns 211ns 0.292 0 0 1.87 KB
master EnrichedLog netcoreapp3.1 5.33μs 26.4ns 156ns 0.0192 0 0 1.49 KB
#2706 EnrichedLog net472 6.08μs 26ns 145ns 0.29 0 0 1.87 KB
#2706 EnrichedLog netcoreapp3.1 5.13μs 15.8ns 56.9ns 0.021 0 0 1.49 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 net472 914ns 4.9ns 26.4ns 0.0716 0 0 457 B
master StartFinishSpan netcoreapp3.1 882ns 4.38ns 22.7ns 0.00627 0 0 456 B
master StartFinishScope net472 1.08μs 4.92ns 18.4ns 0.0846 0 0 538 B
master StartFinishScope netcoreapp3.1 1.05μs 5.34ns 26.2ns 0.00786 0 0 576 B
#2706 StartFinishSpan net472 898ns 3.1ns 11.2ns 0.072 0 0 457 B
#2706 StartFinishSpan netcoreapp3.1 877ns 3.66ns 14.2ns 0.00614 0 0 456 B
#2706 StartFinishScope net472 1.08μs 4.27ns 16ns 0.0843 0 0 538 B
#2706 StartFinishScope netcoreapp3.1 1.03μs 3.62ns 13.5ns 0.00818 0 0 576 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net472 1.28μs 6.7ns 36.7ns 0.0843 0 0 538 B
master RunOnMethodBegin netcoreapp3.1 1.17μs 5.73ns 23.6ns 0.0078 0 0 576 B
#2706 RunOnMethodBegin net472 1.29μs 6.89ns 37.8ns 0.084 0 0 538 B
#2706 RunOnMethodBegin netcoreapp3.1 1.23μs 7ns 50.9ns 0.0077 0 0 576 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants