-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Mini Agent][Private Beta Testing] Mini-agent for Azure Function Apps for non-consumption plans #5792
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 351934 Passed, 1781 Skipped, 14h 39m 0.47s 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). |
Benchmarks Report for tracer 🐌Benchmarks for #5792 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.159 | 592.24 | 686.63 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.195 | 566.36 | 473.75 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 432ns | 0.25ns | 0.968ns | 0.00812 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 553ns | 0.34ns | 1.32ns | 0.00774 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 592ns | 0.353ns | 1.37ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 569ns | 2.28ns | 8.84ns | 0.00971 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 723ns | 1.28ns | 4.96ns | 0.00935 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 807ns | 1.63ns | 6.09ns | 0.104 | 0 | 0 | 658 B |
#5792 | StartFinishSpan |
net6.0 | 407ns | 0.189ns | 0.706ns | 0.00811 | 0 | 0 | 576 B |
#5792 | StartFinishSpan |
netcoreapp3.1 | 596ns | 0.696ns | 2.7ns | 0.00777 | 0 | 0 | 576 B |
#5792 | StartFinishSpan |
net472 | 690ns | 2.7ns | 10.5ns | 0.0917 | 0 | 0 | 578 B |
#5792 | StartFinishScope |
net6.0 | 474ns | 0.151ns | 0.583ns | 0.00973 | 0 | 0 | 696 B |
#5792 | StartFinishScope |
netcoreapp3.1 | 650ns | 0.588ns | 2.28ns | 0.00914 | 0 | 0 | 696 B |
#5792 | StartFinishScope |
net472 | 893ns | 0.528ns | 2.04ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5792
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.124
712.10
633.52
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.124 | 712.10 | 633.52 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 712ns | 0.372ns | 1.39ns | 0.00964 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 1.02μs | 0.989ns | 3.83ns | 0.00917 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.1μs | 3.73ns | 13.5ns | 0.104 | 0 | 0 | 658 B |
#5792 | RunOnMethodBegin |
net6.0 | 634ns | 0.467ns | 1.81ns | 0.00957 | 0 | 0 | 696 B |
#5792 | RunOnMethodBegin |
netcoreapp3.1 | 953ns | 0.514ns | 1.99ns | 0.00955 | 0 | 0 | 696 B |
#5792 | RunOnMethodBegin |
net472 | 1.1μs | 0.567ns | 2.04ns | 0.104 | 0 | 0 | 658 B |
5d72b57
to
89c5b10
Compare
…Functions to cover linux server cases
89c5b10
to
3babef0
Compare
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 (5792) (11.791M) : 0, 11790956
master (11.532M) : 0, 11531520
benchmarks/2.9.0 (11.568M) : 0, 11567598
section Automatic
This PR (5792) (7.714M) : 0, 7713886
master (7.727M) : 0, 7727133
benchmarks/2.9.0 (8.079M) : 0, 8079346
section Trace stats
master (8.135M) : 0, 8135408
section Manual
master (11.628M) : 0, 11627537
section Manual + Automatic
This PR (5792) (7.272M) : 0, 7271558
master (7.183M) : 0, 7183466
section DD_TRACE_ENABLED=0
master (10.711M) : 0, 10710555
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5792) (9.607M) : 0, 9607313
master (9.524M) : 0, 9524383
section Automatic
This PR (5792) (6.636M) : 0, 6636303
master (6.463M) : 0, 6463282
section Trace stats
master (6.871M) : 0, 6871268
section Manual
master (9.587M) : 0, 9586529
section Manual + Automatic
This PR (5792) (6.226M) : 0, 6226049
master (6.162M) : 0, 6162024
section DD_TRACE_ENABLED=0
master (8.819M) : 0, 8818566
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5792) (10.083M) : 0, 10082844
benchmarks/2.9.0 (10.327M) : 0, 10326763
section Automatic
This PR (5792) (6.572M) : 0, 6571569
benchmarks/2.9.0 (7.507M) : 0, 7507426
section Manual + Automatic
This PR (5792) (6.138M) : 0, 6138365
|
Manually tested the cases below. Regression Tests:
Behavior added in this PR:
|
tracer/src/Datadog.Trace/Configuration/ImmutableAzureAppServiceSettings.cs
Outdated
Show resolved
Hide resolved
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.
LGTM, just one low-priority comment
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.
LGTM, just +1 on Lucas' comments
tracer/test/Datadog.Trace.Tests/Configuration/ImmutableAzureAppServiceSettingsTests.cs
Outdated
Show resolved
Hide resolved
…eSettings.cs Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>
…pServiceSettingsTests.cs Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
…ion Plans (#5792 -> v2) (#5986) ## Summary of changes Start Serverless Mini Agent for Azure Functions on Linux Non-Consumption (Basic/Standard/Premium) Plans. ## Reason for change Customers with this setup asking for beta. ## Implementation details ## Test coverage Unit Tests ✅ Manually tested the cases below. Regression Tests: Windows / Premium Plan -> mini agent not started ✅ Windows / Consumption Plan -> mini agent started ✅ Linux / Consumption Plan -> mini agent started ✅ Behavior added in this PR: Linux / Premium Plan -> mini agent started ✅ ## Other details <!-- Fixes #{issue} --> <!--⚠️ Note: where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. --> Follows #5792 --------- Co-authored-by: Joey Zhao <5253430+joeyzhao2018@users.noreply.github.com> Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com> Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
SVLS-4943
Summary of changes
Expand the mini-agent use case in Azure Function Apps from currently only consumption plan to
Reason for change
Implementation details
I've checked the related configurations as listed below and I think they should still apply in the linux server case if we are starting to use mini-agent.
[History] Usage of IsRunningInAzureFunctionsConsumptionPlan
StatsComputationEnabledInternal
. The same PR added.TraceBatchInterval
, used to set the trace batch interval to 0. PR LinkIsRemoteConfigurationAvailable
, used to indicate remote configuration not available.isServerless
of TelemetrySettings. Used to turn off Metrics by default. PR link.Test coverage
minor updates to existing tests
Other notes
I've had the idea that we first detect whether the mini-agent path exists and then set related variables listed above assuming mini-agent will be used. However, after some consideration, I think this approach has two main problems.
DD_MINI_AGENT_PATH
.Let me know if this idea sounds better? Otherwise, let's keep it as simple as this PR.