Skip to content

Don't overwrite the origin#3221

Merged
robertpi merged 1 commit into
masterfrom
robert/asm/correct-origin
Sep 16, 2022
Merged

Don't overwrite the origin#3221
robertpi merged 1 commit into
masterfrom
robert/asm/correct-origin

Conversation

@robertpi

@robertpi robertpi commented Sep 16, 2022

Copy link
Copy Markdown
Member

Summary of changes

Don't overwrite the origin if it's already set.

Reason for change

The origin could be set to 'RUM' or 'Synthetics', we should not overwrite this value.

@robertpi
robertpi requested review from a team as code owners September 16, 2022 08:34
@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report 🐌

Benchmarks for #3221 compared to master:

  • All benchmarks have the same speed
  • 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 719μs 769ns 2.98μs 0.359 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 453μs 174ns 675ns 0 0 0 2.59 KB
#3221 WriteAndFlushEnrichedTraces net472 717μs 723ns 2.8μs 0.359 0 0 3.17 KB
#3221 WriteAndFlushEnrichedTraces netcoreapp3.1 456μs 158ns 571ns 0 0 0 2.58 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 182ns 0.148ns 0.534ns 0.0675 0 0 425 B
master AllCycleSimpleBody netcoreapp3.1 238ns 0.252ns 0.978ns 0.00588 0 0 424 B
master AllCycleMoreComplexBody net472 184ns 0.213ns 0.767ns 0.0638 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 235ns 0.214ns 0.771ns 0.00552 0 0 400 B
master BodyExtractorSimpleBody net472 257ns 0.244ns 0.944ns 0.0573 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 231ns 0.263ns 1.02ns 0.00369 0 0 272 B
master BodyExtractorMoreComplexBody net472 14.6μs 12.7ns 49.2ns 1.21 0.0218 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 11.9μs 13.2ns 49.3ns 0.0892 0 0 6.75 KB
#3221 AllCycleSimpleBody net472 181ns 0.088ns 0.329ns 0.0675 9.2E-05 0 425 B
#3221 AllCycleSimpleBody netcoreapp3.1 238ns 0.255ns 0.986ns 0.00582 0 0 424 B
#3221 AllCycleMoreComplexBody net472 180ns 0.143ns 0.537ns 0.0637 0 0 401 B
#3221 AllCycleMoreComplexBody netcoreapp3.1 236ns 0.228ns 0.883ns 0.00554 0 0 400 B
#3221 BodyExtractorSimpleBody net472 273ns 0.439ns 1.7ns 0.0574 0 0 361 B
#3221 BodyExtractorSimpleBody netcoreapp3.1 227ns 0.209ns 0.81ns 0.00366 0 0 272 B
#3221 BodyExtractorMoreComplexBody net472 15μs 8.14ns 29.3ns 1.2 0.0149 0 7.62 KB
#3221 BodyExtractorMoreComplexBody netcoreapp3.1 11.9μs 9.17ns 35.5ns 0.0893 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 180μs 130ns 487ns 0.269 0 0 20.6 KB
#3221 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3221 SendRequest netcoreapp3.1 180μs 282ns 1.09μs 0.268 0.0894 0 20.59 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 0.747ns 2.79ns 0.15 0.000937 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.45μs 0.863ns 3.34ns 0.0123 0 0 936 B
#3221 ExecuteNonQuery net472 1.88μs 1.9ns 7.37ns 0.15 0 0 947 B
#3221 ExecuteNonQuery netcoreapp3.1 1.43μs 0.829ns 3.21ns 0.0129 0 0 936 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 net472 2.55μs 1.8ns 6.96ns 0.183 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.48μs 0.907ns 3.51ns 0.0147 0 0 1.1 KB
master CallElasticsearchAsync net472 2.66μs 1.87ns 7.23ns 0.204 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.64μs 0.451ns 1.75ns 0.0164 0 0 1.22 KB
#3221 CallElasticsearch net472 2.52μs 1.89ns 7.32ns 0.183 0 0 1.16 KB
#3221 CallElasticsearch netcoreapp3.1 1.58μs 0.586ns 2.19ns 0.0149 0 0 1.1 KB
#3221 CallElasticsearchAsync net472 2.78μs 1.53ns 5.93ns 0.205 0 0 1.29 KB
#3221 CallElasticsearchAsync netcoreapp3.1 1.6μs 0.716ns 2.68ns 0.0168 0 0 1.22 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 net472 2.73μs 3ns 10.8ns 0.225 0 0 1.42 KB
master ExecuteAsync netcoreapp3.1 1.69μs 3.84ns 14.9ns 0.0183 0 0 1.34 KB
#3221 ExecuteAsync net472 2.85μs 4.85ns 18.1ns 0.225 0 0 1.42 KB
#3221 ExecuteAsync netcoreapp3.1 1.73μs 6.27ns 24.3ns 0.0181 0 0 1.34 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 5.69μs 10.8ns 42ns 0.439 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.54μs 6.96ns 27ns 0.0353 0 0 2.6 KB
#3221 SendAsync net472 5.61μs 15.2ns 58.9ns 0.438 0 0 2.77 KB
#3221 SendAsync netcoreapp3.1 3.52μs 5.87ns 22.7ns 0.0352 0 0 2.6 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.17μs 2.57ns 9.95ns 0.288 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.55μs 1.8ns 6.72ns 0.0255 0 0 1.85 KB
#3221 EnrichedLog net472 3.1μs 2.4ns 8.66ns 0.287 0 0 1.81 KB
#3221 EnrichedLog netcoreapp3.1 2.54μs 2.19ns 8.47ns 0.0249 0 0 1.85 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 150μs 185ns 717ns 0.674 0.225 0 4.65 KB
master EnrichedLog netcoreapp3.1 119μs 156ns 604ns 0 0 0 4.49 KB
#3221 EnrichedLog net472 151μs 217ns 839ns 0.673 0.224 0 4.65 KB
#3221 EnrichedLog netcoreapp3.1 115μs 182ns 705ns 0.0572 0 0 4.5 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 net472 5.82μs 9.81ns 38ns 0.568 0.00288 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.31μs 8.01ns 28.9ns 0.0542 0 0 3.91 KB
#3221 EnrichedLog net472 5.61μs 13.3ns 51.5ns 0.568 0.00281 0 3.59 KB
#3221 EnrichedLog netcoreapp3.1 4.36μs 6.32ns 24.5ns 0.0523 0 0 3.91 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.18μs 2.84ns 10.6ns 0.217 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.8μs 0.558ns 2.09ns 0.018 0 0 1.32 KB
#3221 SendReceive net472 2.3μs 0.43ns 1.61ns 0.217 0 0 1.37 KB
#3221 SendReceive netcoreapp3.1 1.82μs 1.44ns 5.2ns 0.0176 0 0 1.32 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 5.02μs 2.8ns 10.5ns 0.353 0.00249 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.27μs 3.15ns 12.2ns 0.0253 0 0 1.8 KB
#3221 EnrichedLog net472 5.04μs 1.63ns 5.87ns 0.353 0.00252 0 2.23 KB
#3221 EnrichedLog netcoreapp3.1 4.29μs 5.67ns 22ns 0.0234 0 0 1.8 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 1.09μs 0.672ns 2.6ns 0.129 0 0 810 B
master StartFinishSpan netcoreapp3.1 924ns 0.357ns 1.38ns 0.0102 0 0 760 B
master StartFinishScope net472 1.48μs 0.863ns 3.34ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.14μs 1.12ns 4.33ns 0.0118 0 0 880 B
#3221 StartFinishSpan net472 1.21μs 0.466ns 1.81ns 0.128 0 0 810 B
#3221 StartFinishSpan netcoreapp3.1 956ns 0.82ns 3.07ns 0.0101 0 0 760 B
#3221 StartFinishScope net472 1.42μs 1.03ns 3.98ns 0.142 0.000708 0 891 B
#3221 StartFinishScope netcoreapp3.1 1.11μs 0.406ns 1.52ns 0.0117 0 0 880 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.42μs 1.23ns 4.75ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.16μs 0.289ns 1.08ns 0.0121 0 0 880 B
#3221 RunOnMethodBegin net472 1.46μs 0.555ns 2.15ns 0.141 0 0 891 B
#3221 RunOnMethodBegin netcoreapp3.1 1.18μs 0.383ns 1.48ns 0.0117 0 0 880 B

@andrewlock

Copy link
Copy Markdown
Member

Code Coverage Report 📊

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

master #3221 Change
Lines 17967 / 24564 18001 / 24566
Lines % 73% 73% 0% ✔️
Branches 10574 / 15054 10595 / 15056
Branches % 70% 70% 0% ✔️
Complexity 16280 16282 2

View the full report for further details:

Datadog.Trace Breakdown ✔️

master #3221 Change
Lines % 73% 73% 0% ✔️
Branches % 70% 70% 0% ✔️
Complexity 16280 16282 2

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Ci.CIVisibility 5% ✔️ 6% ✔️ 0 ✔️
Datadog.Trace.Activity.DiagnosticSourceEventListener 6% ✔️ 0% ✔️ 0 ✔️

View the full reports for further details:

@robertpi
robertpi merged commit 989af60 into master Sep 16, 2022
@robertpi
robertpi deleted the robert/asm/correct-origin branch September 16, 2022 10:43
@github-actions github-actions Bot added this to the vNext milestone Sep 16, 2022
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