[SVLS-7360] Fix Exception Replay in Lambda#8043
Conversation
BenchmarksBenchmark execution time: 2026-01-12 15:19:36 Comparing candidate commit 45845a1 in PR branch Found 8 performance improvements and 6 performance regressions! Performance is the same for 161 metrics, 11 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0
scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
|
This comment has been minimized.
This comment has been minimized.
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 38 occurrences of : - process_id: 0,
- _dd.top_level: 1.0,
- _dd.tracer_kr: 1.0,
- _sampling_priority_v1: 1.0
+ _dd.top_level: 1.0
1 occurrences of : + },
+ {
+ TraceId: Id_1,
+ SpanId: Id_2,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_39,
+ runtime-id: Guid_1,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_3,
+ SpanId: Id_4,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_40,
+ runtime-id: Guid_2,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_5,
+ SpanId: Id_6,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_41,
+ runtime-id: Guid_3,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_7,
+ SpanId: Id_8,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_42,
+ runtime-id: Guid_4,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_9,
+ SpanId: Id_10,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_43,
+ runtime-id: Guid_5,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_11,
+ SpanId: Id_12,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_44,
+ runtime-id: Guid_6,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_13,
+ SpanId: Id_14,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_45,
+ runtime-id: Guid_7,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_15,
+ SpanId: Id_16,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_46,
+ runtime-id: Guid_8,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_17,
+ SpanId: Id_18,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_47,
+ runtime-id: Guid_9,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_19,
+ SpanId: Id_20,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_48,
+ runtime-id: Guid_10,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_21,
+ SpanId: Id_22,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_49,
+ runtime-id: Guid_11,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_23,
+ SpanId: Id_24,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_50,
+ runtime-id: Guid_12,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_25,
+ SpanId: Id_26,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_51,
+ runtime-id: Guid_13,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_27,
+ SpanId: Id_28,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_52,
+ runtime-id: Guid_14,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_29,
+ SpanId: Id_30,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_53,
+ runtime-id: Guid_15,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_31,
+ SpanId: Id_32,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_54,
+ runtime-id: Guid_16,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_33,
+ SpanId: Id_34,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_55,
+ runtime-id: Guid_17,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_35,
+ SpanId: Id_36,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_56,
+ runtime-id: Guid_18,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_37,
+ SpanId: Id_38,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_57,
+ runtime-id: Guid_19,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_39,
+ SpanId: Id_40,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_58,
+ runtime-id: Guid_20,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_41,
+ SpanId: Id_42,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_59,
+ runtime-id: Guid_21,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_43,
+ SpanId: Id_44,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_60,
+ runtime-id: Guid_22,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_45,
+ SpanId: Id_46,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_61,
+ runtime-id: Guid_23,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_47,
+ SpanId: Id_48,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ request_id: Guid_62,
+ runtime-id: Guid_24,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_49,
+ SpanId: Id_50,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ request_id: Guid_63,
+ runtime-id: Guid_25,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_51,
+ SpanId: Id_52,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ request_id: Guid_64,
+ runtime-id: Guid_26,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_53,
+ SpanId: Id_54,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ request_id: Guid_65,
+ runtime-id: Guid_27,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_55,
+ SpanId: Id_56,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ request_id: Guid_66,
+ runtime-id: Guid_28,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_57,
+ SpanId: Id_58,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ request_id: Guid_67,
+ runtime-id: Guid_29,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_59,
+ SpanId: Id_60,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_68,
+ runtime-id: Guid_30,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_61,
+ SpanId: Id_62,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_69,
+ runtime-id: Guid_31,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_63,
+ SpanId: Id_64,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_70,
+ runtime-id: Guid_32,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_65,
+ SpanId: Id_66,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_71,
+ runtime-id: Guid_33,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_67,
+ SpanId: Id_68,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_72,
+ runtime-id: Guid_34,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_69,
+ SpanId: Id_70,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_73,
+ runtime-id: Guid_35,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_71,
+ SpanId: Id_72,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_74,
+ runtime-id: Guid_36,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_73,
+ SpanId: Id_74,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_75,
+ runtime-id: Guid_37,
+ _dd.base_service: Samples.AWS.Lambda
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_75,
+ SpanId: Id_76,
+ Name: dd-tracer-serverless-span,
+ Resource: dd-tracer-serverless-span,
+ Service: dd-tracer-serverless-span,
+ Tags: {
+ language: dotnet,
+ request_id: Guid_76,
+ runtime-id: Guid_38,
+ _dd.base_service: Samples.Amazon.Lambda.RuntimeSupport
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.top_level: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8043) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (69ms) : 67, 70
master - mean (69ms) : 67, 70
section Bailout
This PR (8043) - mean (72ms) : 71, 73
master - mean (72ms) : 71, 74
section CallTarget+Inlining+NGEN
This PR (8043) - mean (1,012ms) : 960, 1064
master - mean (1,018ms) : 964, 1073
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (106ms) : 104, 108
master - mean (106ms) : 103, 109
section Bailout
This PR (8043) - mean (107ms) : 106, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (8043) - mean (735ms) : 677, 793
master - mean (751ms) : 690, 813
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (94ms) : 91, 96
master - mean (94ms) : 92, 96
section Bailout
This PR (8043) - mean (94ms) : 93, 95
master - mean (95ms) : 94, 96
section CallTarget+Inlining+NGEN
This PR (8043) - mean (713ms) : 681, 745
master - mean (705ms) : 646, 765
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (92ms) : 90, 94
master - mean (93ms) : 91, 95
section Bailout
This PR (8043) - mean (93ms) : 92, 94
master - mean (93ms) : 92, 95
section CallTarget+Inlining+NGEN
This PR (8043) - mean (634ms) : 621, 647
master - mean (635ms) : 617, 653
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (194ms) : 189, 198
master - mean (193ms) : 189, 198
section Bailout
This PR (8043) - mean (196ms) : 193, 199
master - mean (198ms) : 194, 201
section CallTarget+Inlining+NGEN
This PR (8043) - mean (1,111ms) : 1071, 1151
master - mean (1,124ms) : 1052, 1197
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (275ms) : 270, 281
master - mean (277ms) : 271, 283
section Bailout
This PR (8043) - mean (276ms) : 273, 280
master - mean (279ms) : 272, 286
section CallTarget+Inlining+NGEN
This PR (8043) - mean (921ms) : 870, 973
master - mean (929ms) : 888, 970
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (270ms) : 265, 276
master - mean (270ms) : 266, 275
section Bailout
This PR (8043) - mean (269ms) : 265, 274
master - mean (270ms) : 267, 273
section CallTarget+Inlining+NGEN
This PR (8043) - mean (924ms) : 872, 976
master - mean (928ms) : 879, 976
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8043) - mean (269ms) : 265, 273
master - mean (270ms) : 265, 275
section Bailout
This PR (8043) - mean (269ms) : 265, 273
master - mean (270ms) : 264, 276
section CallTarget+Inlining+NGEN
This PR (8043) - mean (825ms) : 800, 850
master - mean (824ms) : 804, 844
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45845a104e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var span = tracer.StartSpan( | ||
| PlaceholderOperationName, | ||
| operationName: InvocationSpanName, | ||
| tags: null, | ||
| parent: context.SpanContext, | ||
| serviceName: PlaceholderServiceName, | ||
| addToTraceContext: false); | ||
| serviceName: InvocationSpanName, | ||
| addToTraceContext: true); |
There was a problem hiding this comment.
Preserve sampling metrics if placeholder span is filtered
In LambdaCommon.CreatePlaceholderScope (lines 33–38), the placeholder span is now added to the TraceContext (addToTraceContext: true), which makes it the local root span. As a result, trace-level metrics (e.g., _sampling_priority_v1, _dd.tracer_kr, process_id) get attached to this placeholder (the snapshot update shows they moved off the real spans). If the Lambda extension filters out dd-tracer-serverless-span as intended, the remaining spans will be sent without those trace-level metrics, which can drop sampling priority/keep-rate metadata for the invocation. This manifests when running with an extension that removes the placeholder. Consider copying those metrics to a remaining span (e.g., the aws.lambda span) or avoiding making the placeholder the local root when it will be filtered.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is a good call out, and I believe this is fine as long as the agent (in this case the "Lambda Extension" aka Bottlecap) is handling it correctly.
There was a problem hiding this comment.
We should also consider what happens when using a newer version of the Extension layer with an older version of the tracer layer, and vice-versa. Is this change both backwards- and forwards-compatible?
There was a problem hiding this comment.
We previously were not actually copying the .NET tracer tags, since the extension looks for the span resource dd-tracer-serverless-span here which was never being sent, so this fixes that issue.
The extension always filtered that span and I verified that traces look the same as before, so I think it should be good.
| // Need to set request_id to copy tracer tags to the aws.lambda span | ||
| if (awsRequestId != null) | ||
| { | ||
| span.SetTag("request_id", awsRequestId); |
There was a problem hiding this comment.
request_id is quite ambiguous. Is this the attribute name we're already using elsewhere (in the Extension and other client libraries)? If so, it may be too late to change it.
But we could've used aws.requestid instead which we already use when instrumenting the AWS SDK.
There was a problem hiding this comment.
fwiw, we already send the request id in the http headers we send to the Extension's /lambda/start-invocation and /lambda/end-invocation endpoints. See #7835.
If this has to be in a span attribute for some reason, it seems wasteful to send a whole additional span (dd-tracer-serverless-span) only to carry the request id attribute. Couldn't we add the attribute to the existing lambda.invocation span?
There was a problem hiding this comment.
Yup, the Lambda extension looks for the dd-tracer-serverless-span span with the matching request_id field to enrich the new invocation span here. We want to send this span so that we are able to copy the tracer tags, including the Exception replay snapshot identifiers, to the new invocation span.
Summary of changes
dd-tracer-serverless-spanaws.lambdaspan that is created in the extensionReason for change
To support Exception Replay in Lambda
Test coverage
Manually tested with Lambda

Other details
SVLS-7360