-
Notifications
You must be signed in to change notification settings - Fork 144
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
[tracer] Add s3 instrumentation #6590
base: master
Are you sure you want to change the base?
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 574507 Passed, 5445 Skipped, 46h 28m 9.9s Total Time |
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 (6590) - mean (69ms) : 66, 72
. : milestone, 69,
master - mean (69ms) : 67, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (993ms) : 968, 1018
. : milestone, 993,
master - mean (994ms) : 975, 1013
. : milestone, 994,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (103ms) : 101, 104
. : milestone, 103,
master - mean (103ms) : 100, 105
. : milestone, 103,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (676ms) : 660, 692
. : milestone, 676,
master - mean (677ms) : 662, 692
. : milestone, 677,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (90ms) : 88, 91
. : milestone, 90,
master - mean (90ms) : 88, 92
. : milestone, 90,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (633ms) : 617, 649
. : milestone, 633,
master - mean (635ms) : 618, 651
. : milestone, 635,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (191ms) : 187, 196
. : milestone, 191,
master - mean (191ms) : 187, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (1,110ms) : 1078, 1143
. : milestone, 1110,
master - mean (1,110ms) : 1062, 1158
. : milestone, 1110,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (271ms) : 266, 276
. : milestone, 271,
master - mean (271ms) : 266, 276
. : milestone, 271,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (864ms) : 834, 895
. : milestone, 864,
master - mean (875ms) : 806, 944
. : milestone, 875,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (262ms) : 258, 266
. : milestone, 262,
master - mean (262ms) : 258, 265
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (851ms) : 818, 885
. : milestone, 851,
master - mean (846ms) : 808, 884
. : milestone, 846,
|
Benchmarks Report for tracer 🐌Benchmarks for #6590 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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 | 1.130 | 1,190.80 | 1,345.37 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.19μs | 0.34ns | 1.27ns | 0.013 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.58μs | 0.64ns | 2.48ns | 0.0125 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.85μs | 0.43ns | 1.61ns | 0.145 | 0 | 0 | 915 B |
#6590 | ExecuteAsync |
net6.0 | 1.35μs | 0.648ns | 2.34ns | 0.0132 | 0 | 0 | 952 B |
#6590 | ExecuteAsync |
netcoreapp3.1 | 1.59μs | 0.633ns | 2.37ns | 0.0128 | 0 | 0 | 952 B |
#6590 | ExecuteAsync |
net472 | 1.82μs | 0.673ns | 2.61ns | 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.26μs | 0.821ns | 2.84ns | 0.032 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.32μs | 5.84ns | 22.6ns | 0.0373 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.46μs | 1.53ns | 5.94ns | 0.496 | 0 | 0 | 3.12 KB |
#6590 | SendAsync |
net6.0 | 4.47μs | 3.71ns | 13.9ns | 0.0313 | 0 | 0 | 2.31 KB |
#6590 | SendAsync |
netcoreapp3.1 | 5.28μs | 1.38ns | 4.99ns | 0.0372 | 0 | 0 | 2.85 KB |
#6590 | SendAsync |
net472 | 7.41μs | 1.83ns | 7.07ns | 0.496 | 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.54μs | 0.769ns | 2.98ns | 0.0232 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.07μs | 1.52ns | 5.89ns | 0.0218 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.42μs | 0.75ns | 2.81ns | 0.249 | 0 | 0 | 1.57 KB |
#6590 | EnrichedLog |
net6.0 | 1.56μs | 0.572ns | 2.14ns | 0.0226 | 0 | 0 | 1.64 KB |
#6590 | EnrichedLog |
netcoreapp3.1 | 2.26μs | 2.76ns | 10.7ns | 0.0214 | 0 | 0 | 1.64 KB |
#6590 | EnrichedLog |
net472 | 2.54μs | 0.761ns | 2.74ns | 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 | 113μs | 49.4ns | 178ns | 0.0566 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 116μs | 143ns | 553ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 150μs | 159ns | 616ns | 0.672 | 0.224 | 0 | 4.46 KB |
#6590 | EnrichedLog |
net6.0 | 113μs | 122ns | 474ns | 0.0565 | 0 | 0 | 4.28 KB |
#6590 | EnrichedLog |
netcoreapp3.1 | 117μs | 245ns | 950ns | 0 | 0 | 0 | 4.28 KB |
#6590 | EnrichedLog |
net472 | 151μs | 96.3ns | 360ns | 0.677 | 0.226 | 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.05μs | 1.02ns | 3.93ns | 0.0304 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.23μs | 1.11ns | 4.29ns | 0.0296 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 5.04μs | 2.04ns | 7.9ns | 0.32 | 0 | 0 | 2.02 KB |
#6590 | EnrichedLog |
net6.0 | 2.94μs | 1.89ns | 7.34ns | 0.0309 | 0 | 0 | 2.2 KB |
#6590 | EnrichedLog |
netcoreapp3.1 | 4.02μs | 3.81ns | 14.8ns | 0.0302 | 0 | 0 | 2.2 KB |
#6590 | EnrichedLog |
net472 | 4.95μs | 3.72ns | 14.4ns | 0.32 | 0 | 0 | 2.02 KB |
Benchmarks.Trace.RedisBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6590
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0
1.157
1,313.11
1,518.87
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 | 1.157 | 1,313.11 | 1,518.87 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.31μs | 0.493ns | 1.91ns | 0.0157 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.76μs | 0.966ns | 3.74ns | 0.015 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.13μs | 2.1ns | 7.88ns | 0.183 | 0 | 0 | 1.16 KB |
#6590 | SendReceive |
net6.0 | 1.52μs | 1.04ns | 4.03ns | 0.0159 | 0 | 0 | 1.14 KB |
#6590 | SendReceive |
netcoreapp3.1 | 1.69μs | 1.21ns | 4.54ns | 0.0152 | 0 | 0 | 1.14 KB |
#6590 | SendReceive |
net472 | 2.06μs | 0.807ns | 3.13ns | 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.86μs | 0.867ns | 3.36ns | 0.0228 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.93μs | 2.27ns | 8.81ns | 0.0215 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.35μs | 3.72ns | 14.4ns | 0.322 | 0 | 0 | 2.04 KB |
#6590 | EnrichedLog |
net6.0 | 2.72μs | 0.917ns | 3.55ns | 0.0231 | 0 | 0 | 1.6 KB |
#6590 | EnrichedLog |
netcoreapp3.1 | 3.86μs | 1.33ns | 5.16ns | 0.0212 | 0 | 0 | 1.65 KB |
#6590 | EnrichedLog |
net472 | 4.42μs | 2.35ns | 8.79ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 393ns | 0.822ns | 3.18ns | 0.00811 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 557ns | 0.987ns | 3.82ns | 0.00778 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 596ns | 1.03ns | 3.99ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 488ns | 0.575ns | 2.23ns | 0.00984 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 712ns | 1.03ns | 4ns | 0.00958 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 864ns | 2.22ns | 8.59ns | 0.104 | 0 | 0 | 658 B |
#6590 | StartFinishSpan |
net6.0 | 398ns | 0.637ns | 2.47ns | 0.00815 | 0 | 0 | 576 B |
#6590 | StartFinishSpan |
netcoreapp3.1 | 594ns | 2.02ns | 7.81ns | 0.00769 | 0 | 0 | 576 B |
#6590 | StartFinishSpan |
net472 | 618ns | 1.23ns | 4.77ns | 0.0916 | 0 | 0 | 578 B |
#6590 | StartFinishScope |
net6.0 | 490ns | 0.699ns | 2.71ns | 0.0098 | 0 | 0 | 696 B |
#6590 | StartFinishScope |
netcoreapp3.1 | 717ns | 0.955ns | 3.7ns | 0.00925 | 0 | 0 | 696 B |
#6590 | StartFinishScope |
net472 | 833ns | 1.35ns | 5.23ns | 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 | 649ns | 0.948ns | 3.67ns | 0.00979 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 926ns | 1.74ns | 6.76ns | 0.00968 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.06μs | 2.02ns | 7.83ns | 0.104 | 0 | 0 | 658 B |
#6590 | RunOnMethodBegin |
net6.0 | 636ns | 0.478ns | 1.85ns | 0.0099 | 0 | 0 | 696 B |
#6590 | RunOnMethodBegin |
netcoreapp3.1 | 902ns | 1.73ns | 6.7ns | 0.00943 | 0 | 0 | 696 B |
#6590 | RunOnMethodBegin |
net472 | 1.13μs | 3.34ns | 12.9ns | 0.105 | 0 | 0 | 658 B |
baa2cad
to
8e22164
Compare
…eMultipartUpload, and CompleteMultipartUploadAsync
cdea333
to
2085dfb
Compare
# Conflicts: # tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_DistributionCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_DistributionCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_DistributionCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountCIVisibility.g.cs # tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_DistributionCIVisibility.g.cs # tracer/src/Datadog.Tracer.Native/Generated/generated_calltargets.g.cpp
tracer/test/test-applications/integrations/Samples.AWS.S3/SyncHelpers.cs
Show resolved
Hide resolved
388cb26
to
a5d213e
Compare
a5d213e
to
32b8589
Compare
d603384
to
4163a58
Compare
…on't have tags for bucket or object key
e42f14c
to
e7edd48
Compare
e7edd48
to
6fca491
Compare
/// /my-bucket/ (for bucket-level calls) | ||
/// /my-bucket/key.txt (for object calls) | ||
/// </summary> | ||
public static string BuildS3Path(AwsS3Tags? tags) |
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.
Had to do this to get integration tests to pass across AWSSDK.S3 versions. Would be nice if there was just a way to allow the snapshot to accept either localhost:00000/bucket/
OR localhost:00000/bucket
Summary of changes
Creates an automatic instrumentation for S3's common & important operations (and their async equivalents):
Object management:
Bucket management:
Multipart uploads:
Reason for change
Implementation details
Test coverage
Unit tests:
Integration tests:
Manually tested every operation (see above for images). All instrumentations work since each operation's span does have a custom resource name.
Other details
For AWS S3 v3.3 and v3.5, the bucket path is given as
bucket-name/
. For v3.7+, the bucket path is given asbucket-name
. I had to manually handle this case inRuntimePipelineInvokeIntegration
to get integration tests to pass and for thehttp.url
tags to be consistent across versions. Let me know if there's a better way to handle this.