-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Serverless] Fix not able to disable tracing when running in AWS Lambda #6781
base: master
Are you sure you want to change the base?
Conversation
Datadog ReportAll test runs ❌ 2 Total Test Services: 1 Failed, 1 Passed Test Services
❌ Failed Tests (4)
|
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 (6781) - mean (70ms) : 65, 74
. : milestone, 70,
master - mean (69ms) : 66, 73
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6781) - mean (1,007ms) : 985, 1029
. : milestone, 1007,
master - mean (1,008ms) : 983, 1033
. : milestone, 1008,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6781) - mean (102ms) : 100, 105
. : milestone, 102,
master - mean (102ms) : 100, 104
. : milestone, 102,
section CallTarget+Inlining+NGEN
This PR (6781) - mean (687ms) : 662, 711
. : milestone, 687,
master - mean (688ms) : 670, 706
. : milestone, 688,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6781) - mean (93ms) : 88, 99
. : milestone, 93,
master - mean (89ms) : 87, 91
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (6781) - mean (645ms) : 621, 669
. : milestone, 645,
master - mean (642ms) : 626, 658
. : milestone, 642,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6781) - mean (190ms) : 186, 194
. : milestone, 190,
master - mean (190ms) : 186, 194
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (6781) - mean (1,108ms) : 1075, 1142
. : milestone, 1108,
master - mean (1,109ms) : 1079, 1140
. : milestone, 1109,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6781) - mean (269ms) : 266, 273
. : milestone, 269,
master - mean (269ms) : 265, 273
. : milestone, 269,
section CallTarget+Inlining+NGEN
This PR (6781) - mean (873ms) : 841, 906
. : milestone, 873,
master - mean (880ms) : 847, 914
. : milestone, 880,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6781) - mean (261ms) : 258, 265
. : milestone, 261,
master - mean (263ms) : 259, 267
. : milestone, 263,
section CallTarget+Inlining+NGEN
This PR (6781) - mean (852ms) : 815, 889
. : milestone, 852,
master - mean (858ms) : 822, 895
. : milestone, 858,
|
Benchmarks Report for tracer 🐌Benchmarks for #6781 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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.136 | 468.60 | 412.40 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 469ns | 0.166ns | 0.643ns | 0.0082 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 581ns | 0.902ns | 3.49ns | 0.00774 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 598ns | 0.148ns | 0.573ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 495ns | 0.178ns | 0.69ns | 0.00985 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 723ns | 0.293ns | 1.13ns | 0.00935 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 852ns | 0.339ns | 1.27ns | 0.104 | 0 | 0 | 658 B |
#6781 | StartFinishSpan |
net6.0 | 412ns | 0.108ns | 0.416ns | 0.00803 | 0 | 0 | 576 B |
#6781 | StartFinishSpan |
netcoreapp3.1 | 560ns | 0.525ns | 2.03ns | 0.00761 | 0 | 0 | 576 B |
#6781 | StartFinishSpan |
net472 | 650ns | 0.312ns | 1.21ns | 0.0918 | 0 | 0 | 578 B |
#6781 | StartFinishScope |
net6.0 | 539ns | 0.141ns | 0.548ns | 0.00972 | 0 | 0 | 696 B |
#6781 | StartFinishScope |
netcoreapp3.1 | 717ns | 0.56ns | 2.02ns | 0.00947 | 0 | 0 | 696 B |
#6781 | StartFinishScope |
net472 | 801ns | 0.505ns | 1.96ns | 0.104 | 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 | 676ns | 0.192ns | 0.745ns | 0.00986 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 957ns | 0.315ns | 1.22ns | 0.00911 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.12μs | 0.226ns | 0.876ns | 0.104 | 0 | 0 | 658 B |
#6781 | RunOnMethodBegin |
net6.0 | 610ns | 0.174ns | 0.628ns | 0.00985 | 0 | 0 | 696 B |
#6781 | RunOnMethodBegin |
netcoreapp3.1 | 1.03μs | 0.334ns | 1.25ns | 0.00936 | 0 | 0 | 696 B |
#6781 | RunOnMethodBegin |
net472 | 1.09μs | 0.214ns | 0.8ns | 0.104 | 0 | 0 | 658 B |
f1900a1
to
6a2b42f
Compare
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 1 occurrences of : + },
+ {
+ TraceId: Id_153,
+ SpanId: Id_154,
+ Name: manual.HandlerNoParamSync,
+ Resource: manual.HandlerNoParamSync,
+ Service: Samples.AWS.Lambda,
+ Tags: {
+ language: dotnet,
+ runtime-id: Guid_39
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_153,
+ SpanId: Id_155,
+ Name: http.request,
+ Resource: GET serverless-dummy-api:9005/function/HandlerNoParamSync,
+ Service: Samples.AWS.Lambda-http-client,
+ Type: http,
+ ParentId: Id_154,
+ Tags: {
+ component: WebRequest,
+ http.method: GET,
+ http.status_code: 200,
+ http.url: http://serverless-dummy-api:9005/function/HandlerNoParamSync,
+ language: dotnet,
+ out.host: serverless-dummy-api,
+ runtime-id: Guid_39,
+ span.kind: client,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
|
Summary of changes
Reason for change
A customer was unable to set
DD_TRACE_ENABLED=0
to disable tracingImplementation details
Test coverage
Added two disabled scenarios... will update snapshots once I've grabbed them from CI...
Other details
Fixes https://datadoghq.atlassian.net/browse/SLES-2140