Closed agocs closed 3 weeks ago
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 (6041) - mean (69ms) : 68, 71
. : milestone, 69,
master - mean (70ms) : 67, 73
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (6041) - mean (1,108ms) : 1084, 1133
. : milestone, 1108,
master - mean (1,109ms) : 1084, 1133
. : milestone, 1109,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6041) - mean (109ms) : 106, 112
. : milestone, 109,
master - mean (109ms) : 106, 111
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6041) - mean (770ms) : 754, 786
. : milestone, 770,
master - mean (769ms) : 749, 790
. : milestone, 769,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6041) - mean (92ms) : 89, 95
. : milestone, 92,
master - mean (92ms) : 89, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6041) - mean (721ms) : 706, 736
. : milestone, 721,
master - mean (727ms) : 707, 746
. : milestone, 727,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6041) - mean (191ms) : 187, 195
. : milestone, 191,
master - mean (192ms) : 188, 196
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (6041) - mean (1,205ms) : 1178, 1231
. : milestone, 1205,
master - mean (1,203ms) : 1180, 1226
. : milestone, 1203,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6041) - mean (276ms) : 272, 280
. : milestone, 276,
master - mean (276ms) : 272, 280
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6041) - mean (946ms) : 929, 962
. : milestone, 946,
master - mean (946ms) : 925, 968
. : milestone, 946,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6041) - mean (265ms) : 260, 270
. : milestone, 265,
master - mean (265ms) : 261, 269
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6041) - mean (927ms) : 908, 945
. : milestone, 927,
master - mean (930ms) : 912, 948
. : milestone, 930,
Branch report: chris.agocs/parse_128_bit_trace_id_from_lambda_extension
Commit report: 83201d8
Test service: dd-trace-dotnet
:white_check_mark: 0 Failed, 363186 Passed, 2063 Skipped, 14h 59m 32.05s Total Time
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 (6041) (11.244M) : 0, 11244059
master (11.101M) : 0, 11100941
benchmarks/2.9.0 (11.081M) : 0, 11080577
section Automatic
This PR (6041) (7.434M) : 0, 7434070
master (7.389M) : 0, 7389242
benchmarks/2.9.0 (7.732M) : 0, 7732233
section Trace stats
master (7.528M) : 0, 7528321
section Manual
master (10.986M) : 0, 10986040
section Manual + Automatic
This PR (6041) (6.862M) : 0, 6862422
master (6.820M) : 0, 6819504
section DD_TRACE_ENABLED=0
master (10.304M) : 0, 10304285
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6041) (9.777M) : 0, 9777037
master (9.728M) : 0, 9727588
benchmarks/2.9.0 (9.798M) : 0, 9798067
section Automatic
This PR (6041) (6.768M) : 0, 6768161
master (6.463M) : 0, 6463228
section Trace stats
master (6.591M) : 0, 6591023
section Manual
master (9.627M) : 0, 9627166
section Manual + Automatic
This PR (6041) (6.092M) : 0, 6092230
master (6.028M) : 0, 6027833
section DD_TRACE_ENABLED=0
master (8.762M) : 0, 8761785
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6041) (10.002M) : 0, 10001542
master (9.966M) : 0, 9965554
benchmarks/2.9.0 (10.067M) : 0, 10067315
section Automatic
This PR (6041) (6.758M) : 0, 6757917
master (6.494M) : 0, 6493647
benchmarks/2.9.0 (7.552M) : 0, 7552193
section Trace stats
master (7.096M) : 0, 7096492
section Manual
master (9.850M) : 0, 9850046
section Manual + Automatic
This PR (6041) (6.245M) : 0, 6244577
master (5.952M) : 0, 5952386
section DD_TRACE_ENABLED=0
master (9.119M) : 0, 9118624
Benchmarks for #6041 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored.
Could you fill out the PR description?
@bouwkast Yep! My mistake
Figuring out the null references in the tests...
OK I worked it out. WebHeadersCollection.GetValues
returns null if the header doesn't exist, and ParseUtil.ParseUInt64
can't handle that.
/merge
:steam_locomotive: MergeQueue: waiting for PR to be ready
This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove
command.
Use /merge -c
to cancel this operation!
/remove
:steam_locomotive: Devflow: /remove
:warning: MergeQueue: This merge request was unqueued
This merge request was unqueued
If you need support, contact us on Slack #devflow!
I cherry-picked from this branch back into this branch 🤦. I think no damage was done
The following differences have been observed in committed snapshots. It is meant to help the reviewer. The diff is simplistic, so please check some files anyway while we improve it.
7 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_19,
+ SpanId: Id_20,
+ Name: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Tags: {
+ language: dotnet,
+ 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: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Tags: {
+ language: dotnet,
+ 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: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Tags: {
+ language: dotnet,
+ 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_29,
+ SpanId: Id_30,
+ Name: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Tags: {
+ language: dotnet,
+ 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_53,
+ SpanId: Id_54,
+ Name: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ 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: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ 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: placeholder-operation,
+ Resource: placeholder-operation,
+ Service: placeholder-service,
+ Error: 1,
+ Tags: {
+ error.msg: Cannot assign requested address,
+ error.stack: Cannot assign requested address (SocketException),
+ error.type: System.Net.WebException,
+ language: dotnet,
+ 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
+ }
Summary of changes
I've updated the Lambda extension so it is capable of returning a 128 bit trace ID when a tracer calls the
/lambda/start-invocation
endpoint in this PRAs per the RFC, the
This change modifies the function that calls
/lambda/start-invocation
, allowing it to pick out the upper 64 bits of the trace ID and set the resulting 128-bit trace ID in the extracted context.Reason for change
The Lambda Extension may now return a 128 bit trace ID when a Step Function invokes a Lambda Function.
Implementation details
I rewrote LambdaCommon's
CreatePlaceholderScope
so it usesSpanContextPropagator.Instance.Extract
rather than extracting trace context elements one by one.Test coverage
Added a unit test for 128 bit trace IDs. Fixed existing unit tests so they pass a dictionary of headers to CreatePlaceholderScope. Removed a unit test that only passes SamplingPriority, since a distributed trace with only a sampling priority is hardly a distributed trace at all.
Other details
Backported to 2.x in #6181