[Tracer] add SpanContext.None#2309
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lucaspimentel
commented
Jan 14, 2022
This comment has been minimized.
This comment has been minimized.
lucaspimentel
commented
Jan 14, 2022
3e8c0cd to
a2f151d
Compare
This comment has been minimized.
This comment has been minimized.
andrewlock
approved these changes
Jan 19, 2022
pierotibou
approved these changes
Jan 20, 2022
a2f151d to
67039a0
Compare
Member
Benchmarks Report 🐌Benchmarks for #2309 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 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‑net472 | 1.268 | 3,326.52 | 2,622.75 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net472 | 2.52μs | 8.7ns | 33.7ns | 0.124 | 0 | 0 | 794 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.89μs | 10.4ns | 67.3ns | 0.0113 | 0 | 0 | 784 B |
| master | CallElasticsearchAsync |
net472 | 3.33μs | 13.4ns | 50.1ns | 0.145 | 0 | 0 | 931 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.03μs | 11.7ns | 88ns | 0.0124 | 0 | 0 | 904 B |
| #2309 | CallElasticsearch |
net472 | 2.56μs | 14ns | 92.7ns | 0.124 | 0 | 0 | 794 B |
| #2309 | CallElasticsearch |
netcoreapp3.1 | 1.8μs | 7.62ns | 27.5ns | 0.0107 | 0 | 0 | 784 B |
| #2309 | CallElasticsearchAsync |
net472 | 2.65μs | 14.2ns | 82.9ns | 0.145 | 0 | 0 | 931 B |
| #2309 | CallElasticsearchAsync |
netcoreapp3.1 | 1.87μs | 4.97ns | 19.3ns | 0.013 | 0 | 0 | 904 B |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net472 | 3.03μs | 16.4ns | 111ns | 0.165 | 0 | 0 | 1.05 KB |
| master | ExecuteAsync |
netcoreapp3.1 | 2.16μs | 7.18ns | 26.9ns | 0.0138 | 0 | 0 | 1.02 KB |
| #2309 | ExecuteAsync |
net472 | 2.88μs | 9.77ns | 35.2ns | 0.165 | 0 | 0 | 1.05 KB |
| #2309 | ExecuteAsync |
netcoreapp3.1 | 2.07μs | 6.77ns | 25.3ns | 0.0141 | 0 | 0 | 1.02 KB |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net472 | 6.78μs | 31.1ns | 124ns | 0.352 | 0 | 0 | 2.26 KB |
| master | SendAsync |
netcoreapp3.1 | 4.89μs | 18.8ns | 70.3ns | 0.0288 | 0 | 0 | 2.16 KB |
| #2309 | SendAsync |
net472 | 6.86μs | 22.8ns | 88.2ns | 0.352 | 0 | 0 | 2.26 KB |
| #2309 | SendAsync |
netcoreapp3.1 | 4.72μs | 15.3ns | 55ns | 0.0305 | 0 | 0 | 2.16 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 |
net472 | 3.75μs | 17.9ns | 71.6ns | 0.224 | 0 | 0 | 1.44 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.41μs | 10.9ns | 42.2ns | 0.02 | 0 | 0 | 1.52 KB |
| #2309 | EnrichedLog |
net472 | 3.61μs | 13.6ns | 54.5ns | 0.225 | 0 | 0 | 1.44 KB |
| #2309 | EnrichedLog |
netcoreapp3.1 | 3.37μs | 6.96ns | 26.9ns | 0.022 | 0 | 0 | 1.52 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 |
net472 | 313μs | 1.22μs | 4.73μs | 0.316 | 0.158 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 251μs | 1.01μs | 3.79μs | 0 | 0 | 0 | 4.19 KB |
| #2309 | EnrichedLog |
net472 | 319μs | 1.72μs | 9.86μs | 0.31 | 0.155 | 0 | 4.31 KB |
| #2309 | EnrichedLog |
netcoreapp3.1 | 250μs | 743ns | 2.78μs | 0 | 0 | 0 | 4.19 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 |
net472 | 8.39μs | 35.1ns | 136ns | 0.5 | 0 | 0 | 3.21 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.93μs | 36.9ns | 248ns | 0.0502 | 0 | 0 | 3.58 KB |
| #2309 | EnrichedLog |
net472 | 8.69μs | 48.7ns | 323ns | 0.499 | 0 | 0 | 3.21 KB |
| #2309 | EnrichedLog |
netcoreapp3.1 | 6.85μs | 16.3ns | 56.6ns | 0.0512 | 0 | 0 | 3.58 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 |
net472 | 2.76μs | 15.2ns | 98.7ns | 0.156 | 0 | 0 | 1 KB |
| master | SendReceive |
netcoreapp3.1 | 2.15μs | 12ns | 82.2ns | 0.0139 | 0 | 0 | 1 KB |
| #2309 | SendReceive |
net472 | 2.49μs | 5.28ns | 20.4ns | 0.156 | 0 | 0 | 1 KB |
| #2309 | SendReceive |
netcoreapp3.1 | 2.25μs | 6.58ns | 25.5ns | 0.0144 | 0 | 0 | 1 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 |
net472 | 6.99μs | 31.9ns | 119ns | 0.286 | 0 | 0 | 1.85 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.49μs | 16.7ns | 64.7ns | 0.0197 | 0 | 0 | 1.47 KB |
| #2309 | EnrichedLog |
net472 | 6.69μs | 21ns | 75.7ns | 0.287 | 0 | 0 | 1.85 KB |
| #2309 | EnrichedLog |
netcoreapp3.1 | 5.54μs | 14.9ns | 55.7ns | 0.0194 | 0 | 0 | 1.47 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 |
net472 | 1.02μs | 4.89ns | 19.6ns | 0.0702 | 0 | 0 | 449 B |
| master | StartFinishSpan |
netcoreapp3.1 | 961ns | 3.29ns | 12.3ns | 0.00615 | 0 | 0 | 448 B |
| master | StartFinishScope |
net472 | 1.23μs | 4.46ns | 16.7ns | 0.0829 | 0 | 0 | 530 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.11μs | 2.52ns | 9.76ns | 0.00773 | 0 | 0 | 568 B |
| #2309 | StartFinishSpan |
net472 | 978ns | 4.39ns | 15.8ns | 0.0703 | 0 | 0 | 449 B |
| #2309 | StartFinishSpan |
netcoreapp3.1 | 990ns | 3.02ns | 11.7ns | 0.00635 | 0 | 0 | 448 B |
| #2309 | StartFinishScope |
net472 | 1.22μs | 3.88ns | 15ns | 0.0827 | 0 | 0 | 530 B |
| #2309 | StartFinishScope |
netcoreapp3.1 | 1.16μs | 5.43ns | 24.3ns | 0.00817 | 0 | 0 | 568 B |
Member
Code Coverage Report 📊✔️ Merging #2309 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
The following classes were added in #2309:
View the full reports for further details: |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See issue #2267.
Add a static
SpanContext.Nonethat can be used to explicitly prevent a span from inheriting the currently active span as its parent. This replaces theignoreActiveScopeparameter from .NET Tracer 1.x:Open questions:
Property name:SpanContext.EmptyorSpanContext.None?Underlying type:SpanContextor a new internalReadOnlySpanContexttype?