Run serverless tests on .NET 5.0 and .NET 6.0#3369
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
purple4reina
approved these changes
Oct 20, 2022
This comment has been minimized.
This comment has been minimized.
…de "framework" requests Analogous to the AzureAppService.Metadata property Exposes the IsRunningInLambda property Can use that to exclude requests from the lambda runtime
This is set to a different value in .NET Core 3.1 and .NET 5/6. Will address the default value in a subsequent PR
andrewlock
force-pushed
the
andrew/serverless-dotnet6
branch
from
October 20, 2022 16:38
73e44af to
5c60004
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…o scrub them to all look the same
Contributor
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 29 occurrences of : - Service: Bootstrap,
+ Service: Samples.Aws.Lambda,
23 occurrences of : - Service: Bootstrap-http-client,
+ Service: Samples.Aws.Lambda-http-client,
6 occurrences of : - Service: Bootstrap-http-client,
+ Service: Samples.Aws.Lambda-http-client,
[...]
- error.msg: Cannot assign requested address Cannot assign requested address,
- error.stack:
[...]
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
|
Member
Author
Benchmarks Report 🐌Benchmarks for #3369 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
Member
Author
Code Coverage Report 📊✔️ Merging #3369 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
View the full reports for further details: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Reason for change
We support these frameworks, so we should probably test them, especially as we may need to add .NET 6 specific features (top-level functions).
In the course of this testing, discovered that we are generating spans from the lambda runtime itself, as this uses HttpClient, so we want to exclude those.
If you're interested, the extra http-client requests we generate in the extension look like this
{ TraceId: Id_173, SpanId: Id_174, Name: http.request, Resource: GET localhost:00000/?/runtime/invocation/next, Service: Amazon.Lambda.RuntimeSupport-http-client, Type: http, Tags: { component: HttpMessageHandler, http-client-handler-type: System.Net.Http.HttpClientHandler, http.method: GET, http.status_code: 200, http.url: http://localhost:00000/2018-06-01/runtime/invocation/next, runtime-id: Guid_29, span.kind: client, _dd.p.dm: -0 }, Metrics: { process_id: 0, _dd.agent_psr: 1.0, _dd.top_level: 1.0, _dd.tracer_kr: 1.0, _sampling_priority_v1: 1.0 } }, { TraceId: Id_183, SpanId: Id_184, Name: http.request, Resource: POST localhost:00000/?/runtime/invocation/?/error, Service: Amazon.Lambda.RuntimeSupport-http-client, Type: http, Tags: { component: HttpMessageHandler, http-client-handler-type: System.Net.Http.HttpClientHandler, http.method: POST, http.status_code: 202, http.url: http://localhost:00000/2018-06-01/runtime/invocation/Guid_34/error, runtime-id: Guid_28, span.kind: client, _dd.p.dm: -0 }, Metrics: { process_id: 0, _dd.agent_psr: 1.0, _dd.top_level: 1.0, _dd.tracer_kr: 1.0, _sampling_priority_v1: 1.0 } }, { TraceId: Id_185, SpanId: Id_186, Name: http.request, Resource: POST localhost:00000/?/runtime/invocation/?/response, Service: Amazon.Lambda.RuntimeSupport-http-client, Type: http, Tags: { component: HttpMessageHandler, http-client-handler-type: System.Net.Http.HttpClientHandler, http.method: POST, http.status_code: 202, http.url: http://localhost:00000/2018-06-01/runtime/invocation/Guid_35/response, runtime-id: Guid_1, span.kind: client, _dd.p.dm: -0 }, Metrics: { process_id: 0, _dd.agent_psr: 1.0, _dd.top_level: 1.0, _dd.tracer_kr: 1.0, _sampling_priority_v1: 1.0 } },Implementation details
Generalise the lambda docker files and build process to use a matrix.
Exclude the lambda endpoints from the list of traced http requests.
Test coverage
Yep
Other details
Based on #3367, so need to merge that one first.
Also, I noticed that the default service name used in .NET Core 3.1 and .NET 5/6 changes, so I'm normalizing that by setting
DD_SERVICEfor now, but we should address the default value used here in a later PR, once we've confirmed this is relevant (i.e. it was mentioned the Lambda extension ignores this, so will consider that)