Add support for `ActivityLink`
Summary of changes
Reason for change
Implementation details
Test coverage
Other details
Datadog Report
Branch report: steven/span-links-activity-link
Commit report: 0de7ff1
Test service: dd-trace-dotnet
:white_check_mark: 0 Failed, 304335 Passed, 1015 Skipped, 58m 53.68s Wall Time
Snapshots difference summary
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.
1 occurrences of :
- Resource: Ctor1,
+ Resource: ActivityWithLinks,
1 occurrences of :
+ some_tag: value,
[...]
+ _dd.span_links: [{"span_id":"span_link_id","trace_id":"trace_link_id","attributes":{"some_int":5,"some_string":"five","some_bool":false,"some_int[]":[5,55,555]},"dropped_attributes_count":"2","flags":"0"},{"span_id":"span_link_id","trace_id":"trace_link_id","flags":"1"}]
1 occurrences of :
- Resource: Ctor2,
+ Resource: Ctor1,
[...]
- ParentId: Id_5,
[...]
+ runtime-id: Guid_2,
1 occurrences of :
+ _dd.top_level: 1.0,
[...]
- TraceId: Id_3,
+ TraceId: Id_5,
[...]
+ Resource: Ctor2,
+ Service: Samples.NetActivitySdk,
+ Type: web,
+ ParentId: Id_7,
+ Tags: {
+ env: integration_tests,
+ language: dotnet,
+ otel.library.name: Samples.NetActivitySdk,
+ otel.status_code: STATUS_CODE_UNSET,
+ otel.trace_id: Guid_4,
+ span.kind: server,
+ version: 1.0.0,
+ _dd.git.commit.sha: aaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbb,
+ _dd.git.repository_url: https://github.com/DataDog/dd-trace-dotnet
+ },
+ Metrics: {
+ process_id: 0,
+ _dd.agent_psr: 1.0,
+ _dd.tracer_kr: 1.0,
+ _sampling_priority_v1: 1.0
+ }
+ },
+ {
+ TraceId: Id_5,
+ SpanId: Id_8,
+ Name: server.request,
[...]
- ParentId: Id_5,
+ ParentId: Id_7,
[...]
- otel.trace_id: Guid_3,
+ otel.trace_id: Guid_4,
1 occurrences of :
- TraceId: Id_3,
- SpanId: Id_7,
+ TraceId: Id_5,
+ SpanId: Id_9,
[...]
- ParentId: Id_6,
+ ParentId: Id_8,
[...]
- otel.trace_id: Guid_3,
+ otel.trace_id: Guid_4,
[...]
+ _dd.span_links: [{"span_id":"span_link_id","trace_id":"trace_link_id","flags":"0"}]
[...]
- TraceId: Id_8,
- SpanId: Id_9,
+ TraceId: Id_10,
+ SpanId: Id_11,
1 occurrences of :
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_10,
+ TraceId: Id_10,
+ SpanId: Id_12,
[...]
- ParentId: Id_9,
+ ParentId: Id_11,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_11,
+ TraceId: Id_10,
+ SpanId: Id_13,
[...]
- ParentId: Id_10,
+ ParentId: Id_12,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_12,
+ TraceId: Id_10,
+ SpanId: Id_14,
[...]
- ParentId: Id_11,
+ ParentId: Id_13,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_13,
+ TraceId: Id_10,
+ SpanId: Id_15,
[...]
- ParentId: Id_12,
+ ParentId: Id_14,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_14,
+ TraceId: Id_10,
+ SpanId: Id_16,
[...]
- ParentId: Id_12,
+ ParentId: Id_14,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_15,
+ TraceId: Id_10,
+ SpanId: Id_17,
[...]
- ParentId: Id_14,
+ ParentId: Id_16,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_16,
+ TraceId: Id_10,
+ SpanId: Id_18,
[...]
- ParentId: Id_14,
+ ParentId: Id_16,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_8,
- SpanId: Id_17,
+ TraceId: Id_10,
+ SpanId: Id_19,
[...]
- ParentId: Id_16,
+ ParentId: Id_18,
[...]
- otel.trace_id: Guid_4,
+ otel.trace_id: Guid_5,
1 occurrences of :
- TraceId: Id_18,
- SpanId: Id_19,
+ TraceId: Id_20,
+ SpanId: Id_21,
1 occurrences of :
- TraceId: Id_18,
- SpanId: Id_20,
+ TraceId: Id_20,
+ SpanId: Id_22,
[...]
- ParentId: Id_19,
+ ParentId: Id_21,
1 occurrences of :
- TraceId: Id_21,
- SpanId: Id_22,
+ TraceId: Id_23,
+ SpanId: Id_24,
1 occurrences of :
- otel.trace_id: Guid_5,
+ otel.trace_id: Guid_6,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_24,
+ TraceId: Id_25,
+ SpanId: Id_26,
8 occurrences of :
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_25,
+ TraceId: Id_25,
+ SpanId: Id_27,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_26,
+ TraceId: Id_25,
+ SpanId: Id_28,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_27,
+ TraceId: Id_25,
+ SpanId: Id_29,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_28,
+ TraceId: Id_25,
+ SpanId: Id_30,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_29,
+ TraceId: Id_25,
+ SpanId: Id_31,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_30,
+ TraceId: Id_25,
+ SpanId: Id_32,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_31,
+ TraceId: Id_25,
+ SpanId: Id_33,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_32,
+ TraceId: Id_25,
+ SpanId: Id_34,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_33,
+ TraceId: Id_25,
+ SpanId: Id_35,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_34,
+ TraceId: Id_25,
+ SpanId: Id_36,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_35,
+ TraceId: Id_25,
+ SpanId: Id_37,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_36,
+ TraceId: Id_25,
+ SpanId: Id_38,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_37,
+ TraceId: Id_25,
+ SpanId: Id_39,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_38,
+ TraceId: Id_25,
+ SpanId: Id_40,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_39,
+ TraceId: Id_25,
+ SpanId: Id_41,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_40,
+ TraceId: Id_25,
+ SpanId: Id_42,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_41,
+ TraceId: Id_25,
+ SpanId: Id_43,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_42,
+ TraceId: Id_25,
+ SpanId: Id_44,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_43,
+ TraceId: Id_25,
+ SpanId: Id_45,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_44,
+ TraceId: Id_25,
+ SpanId: Id_46,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_45,
+ TraceId: Id_25,
+ SpanId: Id_47,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_46,
+ TraceId: Id_25,
+ SpanId: Id_48,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_47,
+ TraceId: Id_25,
+ SpanId: Id_49,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_48,
+ TraceId: Id_25,
+ SpanId: Id_50,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_49,
+ TraceId: Id_25,
+ SpanId: Id_51,
[...]
- ParentId: Id_24,
+ ParentId: Id_26,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_50,
+ TraceId: Id_25,
+ SpanId: Id_52,
[...]
- ParentId: Id_27,
+ ParentId: Id_29,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_51,
+ TraceId: Id_25,
+ SpanId: Id_53,
[...]
- ParentId: Id_28,
+ ParentId: Id_30,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_52,
+ TraceId: Id_25,
+ SpanId: Id_54,
[...]
- ParentId: Id_50,
+ ParentId: Id_52,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_53,
+ TraceId: Id_25,
+ SpanId: Id_55,
[...]
- ParentId: Id_52,
+ ParentId: Id_54,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
1 occurrences of :
- TraceId: Id_23,
- SpanId: Id_54,
+ TraceId: Id_25,
+ SpanId: Id_56,
[...]
- ParentId: Id_53,
+ ParentId: Id_55,
[...]
- otel.trace_id: Guid_6,
+ otel.trace_id: Guid_7,
[...]
+ },
+ {
+ TraceId: Id_57,
+ SpanId: Id_58,
+ Name: server.request,
+ Resource: SpanLinkSpan1,
+ Service: Samples.NetActivitySdk,
+ Type: web,
+ Tags: {
+ env: integration_tests,
+ language: dotnet,
+ otel.library.name: Samples.NetActivitySdk,
+ otel.status_code: STATUS_CODE_UNSET,
+ otel.trace_id: Guid_8,
+ runtime-id: Guid_2,
+ span.kind: server,
+ version: 1.0.0,
+ _dd.git.commit.sha: aaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbb,
+ _dd.git.repository_url: https://github.com/DataDog/dd-trace-dotnet
+ },
+ 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_57,
+ SpanId: Id_59,
+ Name: server.request,
+ Resource: SpanLinkSpan2,
+ Service: Samples.NetActivitySdk,
+ Type: web,
+ ParentId: Id_58,
+ Tags: {
+ env: integration_tests,
+ language: dotnet,
+ otel.library.name: Samples.NetActivitySdk,
+ otel.status_code: STATUS_CODE_UNSET,
+ otel.trace_id: Guid_8,
+ span.kind: server,
+ version: 1.0.0,
+ _dd.git.commit.sha: aaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbb,
+ _dd.git.repository_url: https://github.com/DataDog/dd-trace-dotnet
+ }
9 occurrences of :
+ _dd.span_links: [{"span_id":"span_link_id","trace_id":"trace_link_id","tracestate":"app=hello","flags":"1"}]
9 occurrences of :
+ _dd.span_links: [{"span_id":"span_link_id","trace_id":"trace_link_id","tracestate":"app=hello","flags":"1"},{"span_id":"span_link_id","trace_id":"trace_link_id","flags":"1"}]
Execution-Time Benchmarks Report :stopwatch:
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 (5019) - mean (72ms) : 63, 81
. : milestone, 72,
master - mean (69ms) : 66, 73
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (5019) - mean (1,020ms) : 1004, 1036
. : milestone, 1020,
master - mean (1,029ms) : 1008, 1051
. : milestone, 1029,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5019) - mean (105ms) : 101, 109
. : milestone, 105,
master - mean (105ms) : 101, 109
. : milestone, 105,
section CallTarget+Inlining+NGEN
This PR (5019) - mean (729ms) : 710, 749
. : milestone, 729,
master - mean (730ms) : 709, 751
. : milestone, 730,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5019) - mean (90ms) : 87, 92
. : milestone, 90,
master - mean (90ms) : 87, 93
. : milestone, 90,
section CallTarget+Inlining+NGEN
This PR (5019) - mean (688ms) : 669, 706
. : milestone, 688,
master - mean (696ms) : 672, 721
. : milestone, 696,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5019) - mean (188ms) : 185, 191
. : milestone, 188,
master - mean (188ms) : 185, 191
. : milestone, 188,
section CallTarget+Inlining+NGEN
This PR (5019) - mean (1,140ms) : 1119, 1160
. : milestone, 1140,
master - mean (1,137ms) : 1116, 1158
. : milestone, 1137,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5019) - mean (272ms) : 268, 276
. : milestone, 272,
master - mean (272ms) : 268, 275
. : milestone, 272,
section CallTarget+Inlining+NGEN
This PR (5019) - mean (1,096ms) : 1071, 1120
. : milestone, 1096,
master - mean (1,093ms) : 1073, 1114
. : milestone, 1093,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5019) - mean (262ms) : 258, 265
. : milestone, 262,
master - mean (262ms) : 258, 265
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (5019) - mean (1,060ms) : 1037, 1083
. : milestone, 1060,
master - mean (1,058ms) : 1026, 1090
. : milestone, 1058,
Throughput/Crank Report:zap:
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 (5019) (11.497M) : 0, 11496891
master (11.893M) : 0, 11892622
benchmarks/2.9.0 (11.642M) : 0, 11641842
section Automatic
This PR (5019) (7.711M) : 0, 7711331
master (8.099M) : 0, 8098638
benchmarks/2.9.0 (8.382M) : 0, 8382125
section Trace stats
This PR (5019) (7.941M) : 0, 7940955
master (5.895M) : 0, 5895492
section Manual
This PR (5019) (9.747M) : crit ,0, 9747248
master (10.361M) : 0, 10361124
section Manual + Automatic
This PR (5019) (7.248M) : crit ,0, 7248179
master (7.670M) : 0, 7670088
section Version Conflict
This PR (5019) (6.760M) : 0, 6760085
master (6.859M) : 0, 6859229
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5019) (9.722M) : 0, 9722323
master (9.617M) : 0, 9616856
benchmarks/2.9.0 (9.719M) : 0, 9718800
section Automatic
This PR (5019) (6.518M) : 0, 6517615
master (6.615M) : 0, 6615394
section Trace stats
This PR (5019) (6.824M) : 0, 6823924
master (6.934M) : 0, 6934299
section Manual
This PR (5019) (8.304M) : 0, 8304051
master (8.540M) : 0, 8539968
section Manual + Automatic
This PR (5019) (6.204M) : 0, 6203715
master (6.148M) : 0, 6147793
section Version Conflict
This PR (5019) (5.484M) : 0, 5484094
master (5.693M) : 0, 5693193
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5019) (10.056M) : 0, 10056207
benchmarks/2.9.0 (9.943M) : 0, 9943294
section Automatic
This PR (5019) (7.060M) : 0, 7059860
benchmarks/2.9.0 (7.260M) : 0, 7260428
section Trace stats
This PR (5019) (7.428M) : 0, 7428424
section Manual
This PR (5019) (8.861M) : 0, 8860552
section Manual + Automatic
This PR (5019) (6.723M) : 0, 6722965
section Version Conflict
This PR (5019) (6.186M) : 0, 6186137
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
master (7.496M) : 0, 7496114
benchmarks/2.9.0 (7.836M) : 0, 7835831
section No attack
master (1.764M) : 0, 1763502
benchmarks/2.9.0 (3.226M) : 0, 3226182
section Attack
master (1.399M) : 0, 1399328
benchmarks/2.9.0 (2.474M) : 0, 2473872
section Blocking
master (3.098M) : 0, 3097902
section IAST default
master (6.459M) : 0, 6458516
section IAST full
master (5.769M) : 0, 5769139
section Base vuln
master (0.971M) : 0, 970670
section IAST vuln
master (0.901M) : 0, 900962
Done in https://github.com/DataDog/dd-trace-dotnet/pull/5627