Skip to content

Start Serverless Mini Agent for Azure Functions on Linux Non-Consumption Plans (#5792 -> v2)#5986

Merged
andrewlock merged 4 commits into
release/2.xfrom
duncan-harvey/mini-agent-non-consumption-plan
Sep 6, 2024
Merged

Start Serverless Mini Agent for Azure Functions on Linux Non-Consumption Plans (#5792 -> v2)#5986
andrewlock merged 4 commits into
release/2.xfrom
duncan-harvey/mini-agent-non-consumption-plan

Conversation

@duncanpharvey

@duncanpharvey duncanpharvey commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

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

Follows #5792

@duncanpharvey
duncanpharvey force-pushed the duncan-harvey/mini-agent-non-consumption-plan branch from ed3a20c to 948030f Compare September 4, 2024 18:15
@datadog-ddstaging

datadog-ddstaging Bot commented Sep 4, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: duncan-harvey/mini-agent-non-consumption-plan
Commit report: 948030f
Test service: dd-trace-dotnet

✅ 0 Failed, 350021 Passed, 1800 Skipped, 14h 27m 12.94s Total Time

@andrewlock

Copy link
Copy Markdown
Member

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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 (5986) - mean (73ms)  : 65, 82
     .   : milestone, 73,
    master - mean (70ms)  : 67, 74
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (5986) - mean (1,031ms)  : 1012, 1050
     .   : milestone, 1031,
    master - mean (1,080ms)  : 1058, 1103
     .   : milestone, 1080,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5986) - mean (110ms)  : 105, 114
     .   : milestone, 110,
    master - mean (110ms)  : 106, 115
     .   : milestone, 110,

    section CallTarget+Inlining+NGEN
    This PR (5986) - mean (725ms)  : 684, 767
     .   : milestone, 725,
    master - mean (762ms)  : 735, 790
     .   : milestone, 762,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5986) - mean (92ms)  : 89, 94
     .   : milestone, 92,
    master - mean (93ms)  : 90, 95
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (5986) - mean (671ms)  : 650, 692
     .   : milestone, 671,
    master - mean (708ms)  : 685, 731
     .   : milestone, 708,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5986) - mean (190ms)  : 186, 194
     .   : milestone, 190,
    master - mean (190ms)  : 187, 193
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (5986) - mean (1,113ms)  : 1094, 1133
     .   : milestone, 1113,
    master - mean (1,162ms)  : 1131, 1193
     .   : milestone, 1162,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5986) - mean (276ms)  : 271, 281
     .   : milestone, 276,
    master - mean (276ms)  : 271, 281
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (5986) - mean (884ms)  : 859, 910
     .   : milestone, 884,
    master - mean (916ms)  : 899, 932
     .   : milestone, 916,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5986) - mean (265ms)  : 260, 270
     .   : milestone, 265,
    master - mean (265ms)  : 261, 269
     .   : milestone, 265,

    section CallTarget+Inlining+NGEN
    This PR (5986) - mean (876ms)  : 846, 906
     .   : milestone, 876,
    master - mean (904ms)  : 885, 922
     .   : milestone, 904,

Loading

@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report for tracer 🐌

Benchmarks for #5986 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.174
  • 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.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.45μs 41.1ns 250ns 0.0186 0.00745 0 5.42 KB
master StartStopWithChild netcoreapp3.1 10μs 55.6ns 360ns 0.025 0.00999 0 5.62 KB
master StartStopWithChild net472 15.9μs 48.6ns 182ns 1.02 0.304 0.0961 6.07 KB
#5986 StartStopWithChild net6.0 7.6μs 42.6ns 276ns 0.0145 0.00727 0 5.43 KB
#5986 StartStopWithChild netcoreapp3.1 9.72μs 53ns 313ns 0.0146 0.00487 0 5.61 KB
#5986 StartStopWithChild net472 16.1μs 57.9ns 224ns 1.03 0.31 0.098 6.08 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 464μs 228ns 824ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 622μs 185ns 668ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 854μs 341ns 1.32μs 0.425 0 0 3.3 KB
#5986 WriteAndFlushEnrichedTraces net6.0 494μs 151ns 586ns 0 0 0 2.7 KB
#5986 WriteAndFlushEnrichedTraces netcoreapp3.1 630μs 236ns 913ns 0 0 0 2.7 KB
#5986 WriteAndFlushEnrichedTraces net472 828μs 509ns 1.91μs 0.411 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 186μs 1.06μs 7.23μs 0.181 0 0 18.45 KB
master SendRequest netcoreapp3.1 209μs 1.12μs 6.34μs 0.198 0 0 20.61 KB
master SendRequest net472 0.000468ns 0.000329ns 0.00128ns 0 0 0 0 b
#5986 SendRequest net6.0 194μs 1.12μs 9.47μs 0.191 0 0 18.45 KB
#5986 SendRequest netcoreapp3.1 214μs 1.22μs 9.02μs 0.209 0 0 20.61 KB
#5986 SendRequest net472 0.00571ns 0.00137ns 0.00531ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 568μs 2.8μs 12.8μs 0.59 0 0 41.64 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 665μs 3.57μs 19.6μs 0.324 0 0 41.69 KB
master WriteAndFlushEnrichedTraces net472 864μs 3.91μs 15.1μs 8.08 2.55 0.425 53.26 KB
#5986 WriteAndFlushEnrichedTraces net6.0 545μs 2.58μs 10.3μs 0.546 0 0 41.44 KB
#5986 WriteAndFlushEnrichedTraces netcoreapp3.1 678μs 3.41μs 14.5μs 0.332 0 0 41.89 KB
#5986 WriteAndFlushEnrichedTraces net472 881μs 3.75μs 14.5μs 8.68 2.6 0.434 53.33 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 net6.0 1.25μs 0.879ns 3.4ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.73μs 1.36ns 5.27ns 0.014 0 0 1.02 KB
master ExecuteNonQuery net472 1.98μs 1.69ns 6.56ns 0.156 0 0 987 B
#5986 ExecuteNonQuery net6.0 1.34μs 1.3ns 5.05ns 0.0146 0 0 1.02 KB
#5986 ExecuteNonQuery netcoreapp3.1 1.77μs 0.721ns 2.6ns 0.0138 0 0 1.02 KB
#5986 ExecuteNonQuery net472 2.14μs 1.88ns 7.28ns 0.157 0 0 987 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 net6.0 1.21μs 1.13ns 4.24ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.58μs 0.758ns 2.94ns 0.0133 0 0 976 B
master CallElasticsearch net472 2.46μs 0.665ns 2.57ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.24μs 1.38ns 5.33ns 0.013 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.62μs 1.36ns 5.28ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.57μs 1.55ns 6ns 0.166 0 0 1.05 KB
#5986 CallElasticsearch net6.0 1.2μs 0.895ns 3.47ns 0.0133 0 0 976 B
#5986 CallElasticsearch netcoreapp3.1 1.56μs 0.475ns 1.78ns 0.0136 0 0 976 B
#5986 CallElasticsearch net472 2.53μs 2.51ns 9.73ns 0.158 0 0 995 B
#5986 CallElasticsearchAsync net6.0 1.24μs 0.85ns 3.18ns 0.013 0 0 952 B
#5986 CallElasticsearchAsync netcoreapp3.1 1.67μs 1.03ns 3.7ns 0.0141 0 0 1.02 KB
#5986 CallElasticsearchAsync net472 2.55μs 2.59ns 10ns 0.167 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.3μs 1.46ns 5.65ns 0.013 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.62μs 2.18ns 8.43ns 0.0129 0 0 952 B
master ExecuteAsync net472 1.77μs 0.783ns 3.03ns 0.145 0 0 915 B
#5986 ExecuteAsync net6.0 1.34μs 1.36ns 5.27ns 0.0134 0 0 952 B
#5986 ExecuteAsync netcoreapp3.1 1.62μs 0.841ns 3.26ns 0.0129 0 0 952 B
#5986 ExecuteAsync net472 1.73μs 0.554ns 2.07ns 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.14μs 1.31ns 4.9ns 0.0311 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.05μs 1.99ns 7.69ns 0.0354 0 0 2.76 KB
master SendAsync net472 7.84μs 1.25ns 4.82ns 0.497 0 0 3.15 KB
#5986 SendAsync net6.0 4.15μs 5.61ns 21.7ns 0.0312 0 0 2.22 KB
#5986 SendAsync netcoreapp3.1 5.2μs 1.54ns 5.76ns 0.0365 0 0 2.76 KB
#5986 SendAsync net472 7.74μs 1.69ns 6.54ns 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.59μs 0.591ns 2.21ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.39μs 0.723ns 2.71ns 0.0216 0 0 1.64 KB
master EnrichedLog net472 2.72μs 2.41ns 9.02ns 0.249 0 0 1.57 KB
#5986 EnrichedLog net6.0 1.61μs 0.884ns 3.31ns 0.0227 0 0 1.64 KB
#5986 EnrichedLog netcoreapp3.1 2.25μs 0.783ns 2.82ns 0.0214 0 0 1.64 KB
#5986 EnrichedLog net472 2.68μs 2.1ns 7.85ns 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 116μs 168ns 628ns 0.0583 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 120μs 173ns 668ns 0.0596 0 0 4.28 KB
master EnrichedLog net472 149μs 217ns 839ns 0.672 0.224 0 4.46 KB
#5986 EnrichedLog net6.0 114μs 312ns 1.21μs 0.0568 0 0 4.28 KB
#5986 EnrichedLog netcoreapp3.1 120μs 180ns 699ns 0.0606 0 0 4.28 KB
#5986 EnrichedLog net472 149μs 188ns 729ns 0.668 0.223 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 3.22μs 2.05ns 7.95ns 0.0305 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.22μs 1.28ns 4.79ns 0.0296 0 0 2.2 KB
master EnrichedLog net472 4.85μs 1.69ns 6.32ns 0.319 0 0 2.02 KB
#5986 EnrichedLog net6.0 2.97μs 0.998ns 3.73ns 0.03 0 0 2.2 KB
#5986 EnrichedLog netcoreapp3.1 4.09μs 1.43ns 5.54ns 0.0286 0 0 2.2 KB
#5986 EnrichedLog net472 4.78μs 0.85ns 3.29ns 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.29μs 1.2ns 4.65ns 0.0161 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.82μs 1.05ns 4.06ns 0.0155 0 0 1.14 KB
master SendReceive net472 2.18μs 1.85ns 7.17ns 0.183 0.00108 0 1.16 KB
#5986 SendReceive net6.0 1.35μs 0.479ns 1.86ns 0.0162 0 0 1.14 KB
#5986 SendReceive netcoreapp3.1 1.76μs 1.23ns 4.76ns 0.015 0 0 1.14 KB
#5986 SendReceive net472 2.13μs 1.26ns 4.87ns 0.184 0 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 1.01ns 3.9ns 0.023 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.83μs 2.76ns 10.7ns 0.0211 0 0 1.65 KB
master EnrichedLog net472 4.4μs 0.83ns 3.11ns 0.324 0 0 2.04 KB
#5986 EnrichedLog net6.0 2.73μs 0.925ns 3.58ns 0.0219 0 0 1.6 KB
#5986 EnrichedLog netcoreapp3.1 3.79μs 2.56ns 9.57ns 0.0227 0 0 1.65 KB
#5986 EnrichedLog net472 4.27μs 2.76ns 10.7ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5986

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.174 393.39 461.89

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 393ns 0.373ns 1.44ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 585ns 0.662ns 2.56ns 0.0076 0 0 576 B
master StartFinishSpan net472 563ns 0.173ns 0.669ns 0.0916 0 0 578 B
master StartFinishScope net6.0 481ns 0.419ns 1.62ns 0.00979 0 0 696 B
master StartFinishScope netcoreapp3.1 714ns 0.494ns 1.91ns 0.00965 0 0 696 B
master StartFinishScope net472 818ns 0.768ns 2.97ns 0.104 0 0 658 B
#5986 StartFinishSpan net6.0 461ns 0.38ns 1.47ns 0.00812 0 0 576 B
#5986 StartFinishSpan netcoreapp3.1 586ns 0.374ns 1.45ns 0.00776 0 0 576 B
#5986 StartFinishSpan net472 599ns 0.544ns 2.11ns 0.0916 0 0 578 B
#5986 StartFinishScope net6.0 534ns 0.346ns 1.29ns 0.0097 0 0 696 B
#5986 StartFinishScope netcoreapp3.1 651ns 1ns 3.88ns 0.00919 0 0 696 B
#5986 StartFinishScope net472 845ns 0.934ns 3.62ns 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 614ns 0.368ns 1.42ns 0.00987 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 972ns 0.994ns 3.72ns 0.00923 0 0 696 B
master RunOnMethodBegin net472 1.04μs 0.674ns 2.61ns 0.104 0 0 658 B
#5986 RunOnMethodBegin net6.0 619ns 0.833ns 3.23ns 0.0099 0 0 696 B
#5986 RunOnMethodBegin netcoreapp3.1 918ns 0.932ns 3.61ns 0.00925 0 0 696 B
#5986 RunOnMethodBegin net472 1.06μs 1.33ns 5.14ns 0.104 0 0 658 B

@duncanpharvey
duncanpharvey marked this pull request as ready for review September 5, 2024 17:47
@duncanpharvey
duncanpharvey requested review from a team as code owners September 5, 2024 17:47
@andrewlock
andrewlock merged commit 4c5c245 into release/2.x Sep 6, 2024
@andrewlock
andrewlock deleted the duncan-harvey/mini-agent-non-consumption-plan branch September 6, 2024 08:36
@andrewlock andrewlock mentioned this pull request Sep 6, 2024
andrewlock added a commit that referenced this pull request Sep 6, 2024
## Summary of changes

- Try to make the code-freeze PR not block
- Try to prevent timeouts in gitlab jobs

## Reason for change

The auto-pass code freeze check [doesn't seem to be working for
PRs](#5986) to non-master
for some reason.

Also the gitlab job that waits for artifacts to be ready before trying
to download frequently times out.

## Implementation details

Try to force the auto-check to work. It should _already_ be working
AFAICT based on the docs, so this is a stab in the dark 🤞

For the gitlab job, wait for longer
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.

4 participants