-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DSM support for AWS SNS #6253
base: master
Are you sure you want to change the base?
Conversation
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 1 occurrences of : + Name: sns.request,
+ Resource: SNS.PublishBatch,
+ Service: Samples.AWS.SimpleNotificationService-aws-sns,
+ Type: http,
+ ParentId: Id_2,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: PublishBatch,
+ aws.requestId: Guid_3,
+ aws.service: SNS,
+ aws.topic.arn: arn:aws:sns:us-east-1:000000000000:MyTopic,
+ aws.topic.name: MyTopic,
+ aws_service: SNS,
+ component: aws-sdk,
+ env: integration_tests,
+ http.method: POST,
+ http.status_code: 200,
+ http.url: http://localhost:00000/,
+ language: dotnet,
+ runtime-id: Guid_1,
+ span.kind: client,
+ topicname: MyTopic,
+ _dd.base_service: Samples.AWS.SimpleNotificationService
+ },
+ Metrics: {
+ _dd.top_level: 1.0
+ }
+ },
+ {
+ TraceId: Id_1,
+ SpanId: Id_6,
1 occurrences of : + Name: aws.sns.send,
+ Resource: SNS.PublishBatch,
+ Service: Samples.AWS.SimpleNotificationService,
+ Type: http,
+ ParentId: Id_2,
+ Tags: {
+ aws.agent: dotnet-aws-sdk,
+ aws.operation: PublishBatch,
+ aws.requestId: Guid_3,
+ aws.service: SNS,
+ aws.topic.arn: arn:aws:sns:us-east-1:000000000000:MyTopic,
+ aws.topic.name: MyTopic,
+ aws_service: SNS,
+ component: aws-sdk,
+ env: integration_tests,
+ http.method: POST,
+ http.status_code: 200,
+ http.url: http://localhost:00000/,
+ language: dotnet,
+ peer.service: MyTopic,
+ span.kind: producer,
+ topicname: MyTopic,
+ _dd.peer.service.source: topicname
+ }
+ },
+ {
+ TraceId: Id_1,
+ SpanId: Id_6,
|
Datadog.Trace.OSX.slnf
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed that the SNS example was missing from the slnf, so I decided to do a pass and add all missing projects.
Datadog ReportBranch report: ❌ 1 Failed (0 Known Flaky), 447094 Passed, 2710 Skipped, 18h 29m 59.4s Total Time ❌ Failed Tests (1)
|
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:
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 (6253) - mean (73ms) : 63, 82
. : milestone, 73,
master - mean (72ms) : 64, 79
. : milestone, 72,
section CallTarget+Inlining+NGEN
This PR (6253) - mean (1,111ms) : 1094, 1128
. : milestone, 1111,
master - mean (1,110ms) : 1096, 1125
. : milestone, 1110,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6253) - mean (108ms) : 106, 111
. : milestone, 108,
master - mean (109ms) : 106, 113
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6253) - mean (773ms) : 760, 787
. : milestone, 773,
master - mean (775ms) : 757, 793
. : milestone, 775,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6253) - mean (93ms) : 89, 96
. : milestone, 93,
master - mean (93ms) : 88, 97
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (6253) - mean (721ms) : 707, 736
. : milestone, 721,
master - mean (724ms) : 711, 736
. : milestone, 724,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6253) - mean (190ms) : 184, 197
. : milestone, 190,
master - mean (191ms) : 185, 197
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6253) - mean (1,230ms) : 1206, 1253
. : milestone, 1230,
master - mean (1,231ms) : 1206, 1255
. : milestone, 1231,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6253) - mean (276ms) : 270, 282
. : milestone, 276,
master - mean (276ms) : 272, 279
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6253) - mean (949ms) : 931, 967
. : milestone, 949,
master - mean (948ms) : 927, 968
. : milestone, 948,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6253) - mean (266ms) : 262, 269
. : milestone, 266,
master - mean (264ms) : 261, 268
. : milestone, 264,
section CallTarget+Inlining+NGEN
This PR (6253) - mean (925ms) : 905, 944
. : milestone, 925,
master - mean (926ms) : 909, 943
. : milestone, 926,
|
Benchmarks Report for tracer 🐌Benchmarks for #6253 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 | 1.184 | 1,440.72 | 1,216.89 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.37μs | 1.93ns | 7.48ns | 0.0136 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.51μs | 0.541ns | 1.95ns | 0.0129 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.51μs | 1.83ns | 7.11ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.44μs | 0.643ns | 2.49ns | 0.0131 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.65μs | 0.695ns | 2.6ns | 0.0137 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.54μs | 0.708ns | 2.74ns | 0.167 | 0 | 0 | 1.05 KB |
#6253 | CallElasticsearch |
net6.0 | 1.28μs | 1.01ns | 3.8ns | 0.0133 | 0 | 0 | 976 B |
#6253 | CallElasticsearch |
netcoreapp3.1 | 1.56μs | 7.35ns | 28.5ns | 0.013 | 0 | 0 | 976 B |
#6253 | CallElasticsearch |
net472 | 2.59μs | 0.591ns | 2.21ns | 0.158 | 0 | 0 | 995 B |
#6253 | CallElasticsearchAsync |
net6.0 | 1.22μs | 0.464ns | 1.8ns | 0.0129 | 0 | 0 | 952 B |
#6253 | CallElasticsearchAsync |
netcoreapp3.1 | 1.69μs | 0.823ns | 3.19ns | 0.0135 | 0 | 0 | 1.02 KB |
#6253 | CallElasticsearchAsync |
net472 | 2.55μs | 1.15ns | 4.15ns | 0.166 | 0 | 0 | 1.05 KB |
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6253
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0
1.125
1,132.20
1,273.25
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 | 1.125 | 1,132.20 | 1,273.25 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.13μs | 0.481ns | 1.86ns | 0.0131 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.67μs | 0.376ns | 1.3ns | 0.0124 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.79μs | 1.6ns | 5.54ns | 0.145 | 0 | 0 | 915 B |
#6253 | ExecuteAsync |
net6.0 | 1.28μs | 2.3ns | 8.61ns | 0.013 | 0 | 0 | 952 B |
#6253 | ExecuteAsync |
netcoreapp3.1 | 1.71μs | 0.796ns | 3.08ns | 0.0128 | 0 | 0 | 952 B |
#6253 | ExecuteAsync |
net472 | 1.83μs | 0.584ns | 2.19ns | 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.41μs | 2.68ns | 10ns | 0.0329 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.27μs | 1.8ns | 6.74ns | 0.037 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.42μs | 3.7ns | 13.8ns | 0.493 | 0 | 0 | 3.12 KB |
#6253 | SendAsync |
net6.0 | 4.38μs | 1.85ns | 7.16ns | 0.0328 | 0 | 0 | 2.31 KB |
#6253 | SendAsync |
netcoreapp3.1 | 5.27μs | 4.35ns | 16.3ns | 0.0368 | 0 | 0 | 2.85 KB |
#6253 | SendAsync |
net472 | 7.49μs | 5.43ns | 21ns | 0.494 | 0 | 0 | 3.12 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 | 5.07ns | 19.6ns | 0.0233 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.14μs | 1.24ns | 4.81ns | 0.0224 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.48μs | 1.68ns | 6.51ns | 0.25 | 0 | 0 | 1.57 KB |
#6253 | EnrichedLog |
net6.0 | 1.45μs | 1.7ns | 6.58ns | 0.0231 | 0 | 0 | 1.64 KB |
#6253 | EnrichedLog |
netcoreapp3.1 | 2.29μs | 1.55ns | 5.78ns | 0.0218 | 0 | 0 | 1.64 KB |
#6253 | EnrichedLog |
net472 | 2.53μs | 1.29ns | 5.01ns | 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 | 120μs | 174ns | 675ns | 0.0601 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 120μs | 191ns | 741ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 151μs | 210ns | 787ns | 0.678 | 0.226 | 0 | 4.46 KB |
#6253 | EnrichedLog |
net6.0 | 118μs | 102ns | 352ns | 0.0593 | 0 | 0 | 4.28 KB |
#6253 | EnrichedLog |
netcoreapp3.1 | 123μs | 227ns | 879ns | 0 | 0 | 0 | 4.28 KB |
#6253 | EnrichedLog |
net472 | 154μs | 187ns | 724ns | 0.693 | 0.231 | 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.16μs | 0.709ns | 2.75ns | 0.0316 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.13μs | 0.543ns | 1.96ns | 0.0308 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.94μs | 1.55ns | 5.99ns | 0.319 | 0 | 0 | 2.02 KB |
#6253 | EnrichedLog |
net6.0 | 3.26μs | 0.863ns | 3.11ns | 0.0311 | 0 | 0 | 2.2 KB |
#6253 | EnrichedLog |
netcoreapp3.1 | 4.17μs | 0.922ns | 3.45ns | 0.0311 | 0 | 0 | 2.2 KB |
#6253 | EnrichedLog |
net472 | 4.76μs | 1.09ns | 4.22ns | 0.319 | 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.33μs | 0.356ns | 1.33ns | 0.0159 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.72μs | 0.584ns | 2.11ns | 0.0146 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.05μs | 0.847ns | 3.06ns | 0.184 | 0 | 0 | 1.16 KB |
#6253 | SendReceive |
net6.0 | 1.3μs | 1.14ns | 4.43ns | 0.0157 | 0 | 0 | 1.14 KB |
#6253 | SendReceive |
netcoreapp3.1 | 1.75μs | 0.738ns | 2.86ns | 0.0157 | 0 | 0 | 1.14 KB |
#6253 | SendReceive |
net472 | 2.1μs | 1.23ns | 4.78ns | 0.183 | 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.74μs | 1.15ns | 4.46ns | 0.0218 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.94μs | 2.75ns | 10.3ns | 0.0217 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.46μs | 2.48ns | 9.27ns | 0.322 | 0 | 0 | 2.04 KB |
#6253 | EnrichedLog |
net6.0 | 2.76μs | 0.845ns | 3.27ns | 0.0221 | 0 | 0 | 1.6 KB |
#6253 | EnrichedLog |
netcoreapp3.1 | 3.74μs | 0.934ns | 3.62ns | 0.0224 | 0 | 0 | 1.65 KB |
#6253 | EnrichedLog |
net472 | 4.4μs | 1.01ns | 3.9ns | 0.323 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6253
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.225
667.15
544.75
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.150
473.26
411.37
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.225 | 667.15 | 544.75 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.150 | 473.26 | 411.37 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 473ns | 0.421ns | 1.57ns | 0.0081 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 664ns | 2.41ns | 9.32ns | 0.0075 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 720ns | 0.797ns | 3.09ns | 0.0915 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 522ns | 0.457ns | 1.77ns | 0.00978 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 765ns | 0.641ns | 2.48ns | 0.00916 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 906ns | 0.849ns | 3.29ns | 0.104 | 0 | 0 | 658 B |
#6253 | StartFinishSpan |
net6.0 | 412ns | 0.367ns | 1.42ns | 0.00807 | 0 | 0 | 576 B |
#6253 | StartFinishSpan |
netcoreapp3.1 | 544ns | 0.614ns | 2.38ns | 0.0076 | 0 | 0 | 576 B |
#6253 | StartFinishSpan |
net472 | 717ns | 0.772ns | 2.99ns | 0.0916 | 0 | 0 | 578 B |
#6253 | StartFinishScope |
net6.0 | 500ns | 0.332ns | 1.28ns | 0.00979 | 0 | 0 | 696 B |
#6253 | StartFinishScope |
netcoreapp3.1 | 703ns | 0.726ns | 2.81ns | 0.0094 | 0 | 0 | 696 B |
#6253 | StartFinishScope |
net472 | 902ns | 0.636ns | 2.46ns | 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 | 731ns | 0.424ns | 1.59ns | 0.00951 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 977ns | 1.19ns | 4.59ns | 0.00928 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.15μs | 1.61ns | 6.23ns | 0.104 | 0 | 0 | 658 B |
#6253 | RunOnMethodBegin |
net6.0 | 662ns | 0.648ns | 2.51ns | 0.0097 | 0 | 0 | 696 B |
#6253 | RunOnMethodBegin |
netcoreapp3.1 | 975ns | 0.907ns | 3.51ns | 0.00913 | 0 | 0 | 696 B |
#6253 | RunOnMethodBegin |
net472 | 1.22μs | 1.43ns | 5.52ns | 0.104 | 0 | 0 | 658 B |
Throughput/Crank Report ⚡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 (6253) (11.207M) : 0, 11207220
master (11.092M) : 0, 11092190
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6253) (7.195M) : 0, 7195251
master (7.315M) : 0, 7314582
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.630M) : 0, 7629946
section Manual
master (11.027M) : 0, 11026584
section Manual + Automatic
This PR (6253) (6.698M) : 0, 6697637
master (6.813M) : 0, 6813328
section DD_TRACE_ENABLED=0
master (10.150M) : 0, 10150076
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6253) (9.436M) : 0, 9436020
master (9.560M) : 0, 9559953
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6253) (6.266M) : 0, 6265711
master (6.378M) : 0, 6377870
section Trace stats
master (6.751M) : 0, 6751094
section Manual
master (9.498M) : 0, 9497984
section Manual + Automatic
This PR (6253) (5.946M) : 0, 5945837
master (5.967M) : 0, 5966547
section DD_TRACE_ENABLED=0
master (8.995M) : 0, 8994981
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6253) (10.088M) : 0, 10087764
master (10.347M) : 0, 10347441
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6253) (6.486M) : 0, 6485842
master (6.779M) : 0, 6779281
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (7.590M) : 0, 7590179
section Manual
master (10.414M) : 0, 10413511
section Manual + Automatic
This PR (6253) (6.053M) : 0, 6053003
master (5.506M) : 0, 5506075
section DD_TRACE_ENABLED=0
master (9.537M) : 0, 9537294
|
null or "" => ".pre3.7.101.88", | ||
{ } v when new Version(v) < new Version("3.7.101.88") => ".pre3.7.101.88", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was wrong, the value used in the sample app to determine if we do a batch request or not is 3.7.3, and it's the value used by default if there is no version specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified tests to run on .NET Framework could you just check those over to make sure they look good (I think they are fine)
@@ -23,17 +25,24 @@ public static CallTargetState BeforePublish<TPublishRequest>(TPublishRequest req | |||
var requestProxy = request.DuckCast<IAmazonSNSRequestWithTopicArn>(); | |||
|
|||
var scope = AwsSnsCommon.CreateScope(Tracer.Instance, sendType.OperationName, SpanKinds.Producer, out var tags); | |||
|
|||
var topicName = AwsSnsCommon.GetTopicName(requestProxy.TopicArn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requestProxy.TopicArn
appears that it could be null
here as there is the null
check directly below.
Granted the GetTopicName
seems to just return null
when given a null
string
} | ||
|
||
if (scope?.Span.Context is { } context) | ||
{ | ||
var dataStreamsManager = Tracer.Instance.TracerManager.DataStreamsManager; | ||
// avoid allocation if edgeTags are not going to be used | ||
var edgeTags = dataStreamsManager is { IsEnabled: true } ? ["direction:out", $"topic:{topicName}", "type:sns"] : Array.Empty<string>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay that topicName
here can be null
?
// there is no snapshot for NetFramework so this test would fail if run | ||
// but it is compiled, so it still needs to look legit for the CI | ||
var expectedCount = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added tests/snapshots for these
@@ -26,6 +26,9 @@ public static async Task StartSNSTasks(AmazonSimpleNotificationServiceClient sns | |||
await PublishMessageAsync(snsClient, topicArn); | |||
#if AWS_SNS_3_7_3 | |||
await PublishBatchAsync(snsClient, topicArn); | |||
#else | |||
// do a second publish if batch is not available to keep a constant number of spans and make assertions simpler | |||
await PublishMessageAsync(snsClient, topicArn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is okay but I'm unsure how I really feel about this as it is a bit misleading. The span count will be consistent, but not the operations between them.
Summary of changes
Reason for change
Implementation details
Test coverage
Added integration test similar to the one we have for SQS
Other details
JIRA: AIDM-414