-
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: ❌ 2 Failed (0 Known Flaky), 574643 Passed, 4933 Skipped, 46h 52m 52.65s Total Time ❌ Failed Tests (2)
|
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 (70ms) : 66, 73
. : milestone, 70,
master - mean (69ms) : 66, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (984ms) : 955, 1013
. : milestone, 984,
master - mean (983ms) : 961, 1005
. : milestone, 983,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (108ms) : 105, 110
. : milestone, 108,
master - mean (108ms) : 106, 110
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (675ms) : 658, 692
. : milestone, 675,
master - mean (674ms) : 659, 688
. : milestone, 674,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (92ms) : 90, 93
. : milestone, 92,
master - mean (91ms) : 89, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (631ms) : 613, 648
. : milestone, 631,
master - mean (630ms) : 614, 646
. : milestone, 630,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (190ms) : 186, 193
. : milestone, 190,
master - mean (190ms) : 185, 195
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (1,091ms) : 1060, 1122
. : milestone, 1091,
master - mean (1,093ms) : 1061, 1125
. : milestone, 1093,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (275ms) : 270, 279
. : milestone, 275,
master - mean (276ms) : 271, 280
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (864ms) : 832, 895
. : milestone, 864,
master - mean (868ms) : 836, 899
. : milestone, 868,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6590) - mean (264ms) : 260, 268
. : milestone, 264,
master - mean (263ms) : 260, 267
. : milestone, 263,
section CallTarget+Inlining+NGEN
This PR (6590) - mean (845ms) : 804, 885
. : milestone, 845,
master - mean (850ms) : 812, 889
. : milestone, 850,
|
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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.165 | 402.60 | 469.01 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 | 1.293 | 895.28 | 692.32 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.120 | 656.25 | 586.19 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 403ns | 0.102ns | 0.382ns | 0.00812 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 576ns | 0.53ns | 1.98ns | 0.00749 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 656ns | 0.208ns | 0.779ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 474ns | 0.213ns | 0.823ns | 0.00976 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 756ns | 0.349ns | 1.35ns | 0.00941 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 896ns | 0.292ns | 1.13ns | 0.104 | 0 | 0 | 658 B |
#6590 | StartFinishSpan |
net6.0 | 468ns | 0.547ns | 2.12ns | 0.00796 | 0 | 0 | 576 B |
#6590 | StartFinishSpan |
netcoreapp3.1 | 561ns | 0.952ns | 3.69ns | 0.00795 | 0 | 0 | 576 B |
#6590 | StartFinishSpan |
net472 | 585ns | 1.49ns | 5.36ns | 0.0917 | 0 | 0 | 578 B |
#6590 | StartFinishScope |
net6.0 | 479ns | 0.809ns | 3.03ns | 0.00991 | 0 | 0 | 696 B |
#6590 | StartFinishScope |
netcoreapp3.1 | 701ns | 1.69ns | 6.56ns | 0.00966 | 0 | 0 | 696 B |
#6590 | StartFinishScope |
net472 | 693ns | 1.62ns | 6.27ns | 0.105 | 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 | 632ns | 0.369ns | 1.43ns | 0.00956 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 906ns | 0.394ns | 1.47ns | 0.00935 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.03μs | 0.405ns | 1.57ns | 0.104 | 0 | 0 | 658 B |
#6590 | RunOnMethodBegin |
net6.0 | 668ns | 0.666ns | 2.58ns | 0.00965 | 0 | 0 | 696 B |
#6590 | RunOnMethodBegin |
netcoreapp3.1 | 932ns | 1.31ns | 5.07ns | 0.00929 | 0 | 0 | 696 B |
#6590 | RunOnMethodBegin |
net472 | 1.06μs | 3.13ns | 12.1ns | 0.104 | 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
private const string ObjectKey = "sample.txt"; | ||
private const string ObjectContent = "Hello World!"; | ||
|
||
public static void StartS3Tasks(AmazonS3Client s3Client) |
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.
Should we also add coverage for the other new integrations like CopyObject
, etc?
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.
yes, i'll get that to that once I can get these tests to pass
388cb26
to
a5d213e
Compare
a5d213e
to
32b8589
Compare
d603384
to
4163a58
Compare
…on't have tags for bucket or object key
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.