-
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
Add support for 3.*
of log4net
#6075
Conversation
@@ -22,7 +22,7 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.Log4Net.DirectSu | |||
ReturnTypeName = "log4net.Appender.IAppender[]", | |||
ParameterTypeNames = new string[0], | |||
MinimumVersion = "2.0.0", | |||
MaximumVersion = "2.*.*", | |||
MaximumVersion = "3.*.*", |
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 am planning on doing the due diligence to verify that this is correct still.
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.
Appears to be good still - not seeing any changes:
@@ -19,7 +19,7 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net | |||
ReturnTypeName = ClrNames.Int32, | |||
ParameterTypeNames = new[] { "log4net.Core.LoggingEvent" }, | |||
MinimumVersion = "1.0.0", | |||
MaximumVersion = "2.*.*", | |||
MaximumVersion = "3.*.*", |
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 am planning on doing the due diligence to verify that this is correct still.
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.
Appears to be good still, there are some new nullable checks in here added, but should be fine.
tracer/test/test-applications/integrations/LogsInjection.Log4Net/LogsInjection.Log4Net.csproj
Show resolved
Hide resolved
Datadog ReportBranch report: ✅ 0 Failed, 365877 Passed, 2101 Skipped, 15h 35m 43.01s 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 (6075) - mean (71ms) : 68, 74
. : milestone, 71,
master - mean (70ms) : 67, 74
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (6075) - mean (1,112ms) : 1090, 1133
. : milestone, 1112,
master - mean (1,105ms) : 1083, 1126
. : milestone, 1105,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6075) - mean (110ms) : 107, 114
. : milestone, 110,
master - mean (109ms) : 107, 112
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6075) - mean (776ms) : 753, 799
. : milestone, 776,
master - mean (772ms) : 759, 785
. : milestone, 772,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6075) - mean (94ms) : 90, 99
. : milestone, 94,
master - mean (93ms) : 90, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (6075) - mean (736ms) : 715, 756
. : milestone, 736,
master - mean (727ms) : 713, 742
. : milestone, 727,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6075) - mean (190ms) : 187, 193
. : milestone, 190,
master - mean (190ms) : 187, 194
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (6075) - mean (1,197ms) : 1169, 1224
. : milestone, 1197,
master - mean (1,194ms) : 1172, 1217
. : milestone, 1194,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6075) - mean (275ms) : 271, 279
. : milestone, 275,
master - mean (276ms) : 272, 280
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6075) - mean (941ms) : 926, 956
. : milestone, 941,
master - mean (940ms) : 924, 957
. : milestone, 940,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6075) - mean (265ms) : 261, 269
. : milestone, 265,
master - mean (265ms) : 261, 268
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6075) - mean (928ms) : 902, 954
. : milestone, 928,
master - mean (922ms) : 908, 937
. : milestone, 922,
|
Benchmarks Report for tracer 🐌Benchmarks for #6075 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.CallElasticsearch‑net6.0 | 1.144 | 1,123.00 | 1,284.60 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.12μs | 0.569ns | 2.21ns | 0.0136 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.53μs | 4.27ns | 16.5ns | 0.013 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.61μs | 2.16ns | 8.1ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.27μs | 1.03ns | 3.84ns | 0.0135 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.7μs | 1.61ns | 6.01ns | 0.0133 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.53μs | 1.11ns | 4.3ns | 0.167 | 0 | 0 | 1.05 KB |
#6075 | CallElasticsearch |
net6.0 | 1.28μs | 0.955ns | 3.7ns | 0.0134 | 0 | 0 | 976 B |
#6075 | CallElasticsearch |
netcoreapp3.1 | 1.56μs | 0.418ns | 1.62ns | 0.0134 | 0 | 0 | 976 B |
#6075 | CallElasticsearch |
net472 | 2.54μs | 0.991ns | 3.84ns | 0.157 | 0 | 0 | 995 B |
#6075 | CallElasticsearchAsync |
net6.0 | 1.31μs | 0.92ns | 3.56ns | 0.0131 | 0 | 0 | 952 B |
#6075 | CallElasticsearchAsync |
netcoreapp3.1 | 1.59μs | 0.596ns | 2.31ns | 0.0143 | 0 | 0 | 1.02 KB |
#6075 | CallElasticsearchAsync |
net472 | 2.53μs | 1.75ns | 6.77ns | 0.166 | 0 | 0 | 1.05 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.36μs | 0.919ns | 3.44ns | 0.0136 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.57μs | 0.542ns | 1.88ns | 0.0125 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.9μs | 1.16ns | 4.51ns | 0.145 | 0 | 0 | 915 B |
#6075 | ExecuteAsync |
net6.0 | 1.26μs | 0.47ns | 1.76ns | 0.0133 | 0 | 0 | 952 B |
#6075 | ExecuteAsync |
netcoreapp3.1 | 1.64μs | 1.18ns | 4.41ns | 0.0132 | 0 | 0 | 952 B |
#6075 | ExecuteAsync |
net472 | 1.81μs | 0.675ns | 2.61ns | 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.15μs | 1.19ns | 4.45ns | 0.0312 | 0 | 0 | 2.22 KB |
master | SendAsync |
netcoreapp3.1 | 4.97μs | 1.57ns | 5.89ns | 0.0375 | 0 | 0 | 2.76 KB |
master | SendAsync |
net472 | 7.85μs | 2.62ns | 10.1ns | 0.499 | 0 | 0 | 3.15 KB |
#6075 | SendAsync |
net6.0 | 4.23μs | 2.35ns | 8.8ns | 0.0296 | 0 | 0 | 2.22 KB |
#6075 | SendAsync |
netcoreapp3.1 | 5.06μs | 3.59ns | 13.9ns | 0.0379 | 0 | 0 | 2.76 KB |
#6075 | SendAsync |
net472 | 7.72μs | 2.3ns | 8.89ns | 0.499 | 0 | 0 | 3.15 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.52μs | 1.02ns | 3.93ns | 0.0229 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.25μs | 1.03ns | 3.84ns | 0.0226 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.46μs | 1.52ns | 5.87ns | 0.25 | 0 | 0 | 1.57 KB |
#6075 | EnrichedLog |
net6.0 | 1.52μs | 0.936ns | 3.5ns | 0.0229 | 0 | 0 | 1.64 KB |
#6075 | EnrichedLog |
netcoreapp3.1 | 2.16μs | 1.56ns | 5.39ns | 0.0215 | 0 | 0 | 1.64 KB |
#6075 | EnrichedLog |
net472 | 2.4μs | 1.01ns | 3.77ns | 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 | 114μs | 203ns | 787ns | 0.0567 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 119μs | 167ns | 647ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 148μs | 192ns | 743ns | 0.661 | 0.22 | 0 | 4.46 KB |
#6075 | EnrichedLog |
net6.0 | 114μs | 42.3ns | 147ns | 0.0567 | 0 | 0 | 4.28 KB |
#6075 | EnrichedLog |
netcoreapp3.1 | 120μs | 311ns | 1.21μs | 0 | 0 | 0 | 4.28 KB |
#6075 | EnrichedLog |
net472 | 149μs | 159ns | 614ns | 0.667 | 0.222 | 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 | 2.94μs | 1.22ns | 4.41ns | 0.0311 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.03μs | 1.21ns | 4.7ns | 0.03 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 5.02μs | 1.86ns | 7.19ns | 0.319 | 0 | 0 | 2.02 KB |
#6075 | EnrichedLog |
net6.0 | 3.05μs | 10.2ns | 39.4ns | 0.0303 | 0 | 0 | 2.2 KB |
#6075 | EnrichedLog |
netcoreapp3.1 | 4.19μs | 1.51ns | 5.45ns | 0.0293 | 0 | 0 | 2.2 KB |
#6075 | EnrichedLog |
net472 | 4.84μs | 0.719ns | 2.78ns | 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.42μs | 1.25ns | 4.86ns | 0.0163 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.71μs | 0.83ns | 3.11ns | 0.0153 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.06μs | 0.875ns | 3.39ns | 0.184 | 0 | 0 | 1.16 KB |
#6075 | SendReceive |
net6.0 | 1.34μs | 1.41ns | 5.48ns | 0.016 | 0 | 0 | 1.14 KB |
#6075 | SendReceive |
netcoreapp3.1 | 1.77μs | 0.992ns | 3.71ns | 0.0156 | 0 | 0 | 1.14 KB |
#6075 | SendReceive |
net472 | 2.1μs | 1.31ns | 5.09ns | 0.184 | 0.00105 | 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.69μs | 0.917ns | 3.55ns | 0.0215 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 4μs | 1.58ns | 5.91ns | 0.0219 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.36μs | 1.75ns | 6.54ns | 0.323 | 0 | 0 | 2.04 KB |
#6075 | EnrichedLog |
net6.0 | 2.8μs | 0.755ns | 2.92ns | 0.0224 | 0 | 0 | 1.6 KB |
#6075 | EnrichedLog |
netcoreapp3.1 | 3.99μs | 1.19ns | 4.63ns | 0.0217 | 0 | 0 | 1.65 KB |
#6075 | EnrichedLog |
net472 | 4.49μs | 1.85ns | 7.18ns | 0.323 | 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 | 393ns | 0.165ns | 0.619ns | 0.00804 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 545ns | 0.217ns | 0.783ns | 0.00768 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 680ns | 0.509ns | 1.97ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 558ns | 0.214ns | 0.829ns | 0.00978 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 657ns | 0.477ns | 1.85ns | 0.0093 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 835ns | 0.834ns | 3.12ns | 0.104 | 0 | 0 | 658 B |
#6075 | StartFinishSpan |
net6.0 | 410ns | 0.172ns | 0.668ns | 0.00802 | 0 | 0 | 576 B |
#6075 | StartFinishSpan |
netcoreapp3.1 | 537ns | 0.277ns | 1.04ns | 0.00778 | 0 | 0 | 576 B |
#6075 | StartFinishSpan |
net472 | 635ns | 0.378ns | 1.46ns | 0.0916 | 0 | 0 | 578 B |
#6075 | StartFinishScope |
net6.0 | 529ns | 0.202ns | 0.782ns | 0.00981 | 0 | 0 | 696 B |
#6075 | StartFinishScope |
netcoreapp3.1 | 672ns | 0.294ns | 1.14ns | 0.00939 | 0 | 0 | 696 B |
#6075 | StartFinishScope |
net472 | 869ns | 2.12ns | 7.93ns | 0.105 | 0 | 0 | 658 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 |
net6.0 | 572ns | 0.289ns | 1.12ns | 0.00984 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 888ns | 1.9ns | 7.36ns | 0.00947 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.12μs | 1.09ns | 4.21ns | 0.104 | 0 | 0 | 658 B |
#6075 | RunOnMethodBegin |
net6.0 | 591ns | 0.376ns | 1.46ns | 0.00983 | 0 | 0 | 696 B |
#6075 | RunOnMethodBegin |
netcoreapp3.1 | 896ns | 0.248ns | 0.927ns | 0.00962 | 0 | 0 | 696 B |
#6075 | RunOnMethodBegin |
net472 | 1.07μs | 0.33ns | 1.28ns | 0.104 | 0 | 0 | 658 B |
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 (6075) (11.062M) : 0, 11062146
master (10.930M) : 0, 10929935
benchmarks/2.9.0 (11.081M) : 0, 11080577
section Automatic
This PR (6075) (7.323M) : 0, 7323410
master (7.314M) : 0, 7313759
benchmarks/2.9.0 (7.732M) : 0, 7732233
section Trace stats
master (7.732M) : 0, 7732033
section Manual
master (10.861M) : 0, 10861024
section Manual + Automatic
This PR (6075) (6.824M) : 0, 6823728
master (6.769M) : 0, 6769200
section DD_TRACE_ENABLED=0
master (10.060M) : 0, 10059907
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6075) (9.420M) : 0, 9420238
master (9.514M) : 0, 9514093
benchmarks/2.9.0 (9.798M) : 0, 9798067
section Automatic
This PR (6075) (6.608M) : 0, 6608008
master (6.435M) : 0, 6435454
section Trace stats
master (6.873M) : 0, 6873207
section Manual
master (9.470M) : 0, 9470296
section Manual + Automatic
This PR (6075) (6.176M) : 0, 6176138
master (6.063M) : 0, 6063264
section DD_TRACE_ENABLED=0
master (8.925M) : 0, 8925381
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6075) (10.055M) : 0, 10055113
master (10.100M) : 0, 10100102
benchmarks/2.9.0 (10.067M) : 0, 10067315
section Automatic
This PR (6075) (6.555M) : 0, 6555024
master (6.811M) : 0, 6810644
benchmarks/2.9.0 (7.552M) : 0, 7552193
section Trace stats
master (7.461M) : 0, 7461037
section Manual
master (10.234M) : 0, 10233774
section Manual + Automatic
This PR (6075) (6.083M) : 0, 6082716
master (6.269M) : 0, 6268679
section DD_TRACE_ENABLED=0
master (9.440M) : 0, 9440381
|
5070ee0
to
0f75b51
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.
Awesome, thanks!
0f75b51
to
60627ce
Compare
Summary of changes
Adds support for v3 of
log4net
Reason for change
We only went to v2.
Implementation details
Updated to v3 in places necessary.
Test coverage
Updated sample app to use v3 and tests passed.
Other details