Use sensible default service name in AAS (Functions & WebApps)#2007
Merged
colin-higgins merged 2 commits intomasterfrom Nov 9, 2021
Merged
Use sensible default service name in AAS (Functions & WebApps)#2007colin-higgins merged 2 commits intomasterfrom
colin-higgins merged 2 commits intomasterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
zacharycmontoya
approved these changes
Nov 8, 2021
Member
Benchmarks Report 🐌Benchmarks for #2007 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‑netcoreapp3.1 | 1.129 | 1,889.38 | 1,673.22 |
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net472 | 2.929 μs | 0.0347 μs | 0.0271 μs | 0.1286 | 0.0000 | 0.0000 | 827 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.713 μs | 0.0335 μs | 0.0297 μs | 0.0105 | 0.0000 | 0.0000 | 768 B |
| master | CallElasticsearchAsync |
net472 | 3.316 μs | 0.0662 μs | 0.1338 μs | 0.1505 | 0.0000 | 0.0000 | 963 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 1.891 μs | 0.0340 μs | 0.0284 μs | 0.0122 | 0.0000 | 0.0000 | 888 B |
| #2007 | CallElasticsearch |
net472 | 2.953 μs | 0.0582 μs | 0.0572 μs | 0.1286 | 0.0000 | 0.0000 | 827 B |
| #2007 | CallElasticsearch |
netcoreapp3.1 | 1.566 μs | 0.0225 μs | 0.0210 μs | 0.0108 | 0.0000 | 0.0000 | 768 B |
| #2007 | CallElasticsearchAsync |
net472 | 3.200 μs | 0.0535 μs | 0.0447 μs | 0.1492 | 0.0000 | 0.0000 | 963 B |
| #2007 | CallElasticsearchAsync |
netcoreapp3.1 | 1.681 μs | 0.0280 μs | 0.0262 μs | 0.0124 | 0.0000 | 0.0000 | 888 B |
Benchmarks.Trace.GraphQLBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #2007
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1
1.173
2,130.93
1,816.78
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 | 1.173 | 2,130.93 | 1,816.78 |
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net472 | 3.406 μs | 0.0666 μs | 0.0740 μs | 0.1690 | 0.0000 | 0.0000 | 1083 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.132 μs | 0.0249 μs | 0.0220 μs | 0.0140 | 0.0000 | 0.0000 | 1008 B |
| #2007 | ExecuteAsync |
net472 | 3.324 μs | 0.0501 μs | 0.0418 μs | 0.1691 | 0.0000 | 0.0000 | 1083 B |
| #2007 | ExecuteAsync |
netcoreapp3.1 | 1.814 μs | 0.0252 μs | 0.0235 μs | 0.0144 | 0.0000 | 0.0000 | 1008 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net472 | 5.878 μs | 0.1040 μs | 0.0973 μs | 0.3500 | 0.0000 | 0.0000 | 2.19 KB |
| master | SendAsync |
netcoreapp3.1 | 4.427 μs | 0.0871 μs | 0.1193 μs | 0.0310 | 0.0000 | 0.0000 | 2.09 KB |
| #2007 | SendAsync |
net472 | 5.905 μs | 0.0888 μs | 0.0787 μs | 0.3493 | 0.0000 | 0.0000 | 2.19 KB |
| #2007 | SendAsync |
netcoreapp3.1 | 4.378 μs | 0.0857 μs | 0.1501 μs | 0.0284 | 0.0000 | 0.0000 | 2.09 KB |
Benchmarks.Trace.ILoggerBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #2007
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472
1.254
3,896.68
4,884.86
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 | 1.254 | 3,896.68 | 4,884.86 |
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net472 | 3.903 μs | 0.0497 μs | 0.0465 μs | 0.2876 | 0.0000 | 0.0000 | 1.79 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.749 μs | 0.0535 μs | 0.0447 μs | 0.0281 | 0.0000 | 0.0000 | 1.94 KB |
| #2007 | EnrichedLog |
net472 | 4.881 μs | 0.0763 μs | 0.0714 μs | 0.2860 | 0.0000 | 0.0000 | 1.79 KB |
| #2007 | EnrichedLog |
netcoreapp3.1 | 3.575 μs | 0.0305 μs | 0.0270 μs | 0.0264 | 0.0000 | 0.0000 | 1.94 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net472 | 172.4 μs | 1.82 μs | 1.70 μs | 0.6974 | 0.2615 | 0.0000 | 5.23 KB |
| master | EnrichedLog |
netcoreapp3.1 | 147.4 μs | 2.60 μs | 2.43 μs | 0.0000 | 0.0000 | 0.0000 | 5.05 KB |
| #2007 | EnrichedLog |
net472 | 174.4 μs | 3.16 μs | 2.96 μs | 0.7072 | 0.2652 | 0.0000 | 5.23 KB |
| #2007 | EnrichedLog |
netcoreapp3.1 | 147.3 μs | 2.85 μs | 3.80 μs | 0.0715 | 0.0000 | 0.0000 | 5.05 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net472 | 11.663 μs | 0.1786 μs | 0.1671 μs | 0.8536 | 0.0000 | 0.0000 | 5.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 9.966 μs | 0.1411 μs | 0.1251 μs | 0.0888 | 0.0000 | 0.0000 | 6.28 KB |
| #2007 | EnrichedLog |
net472 | 11.117 μs | 0.2165 μs | 0.1919 μs | 0.8555 | 0.0000 | 0.0000 | 5.31 KB |
| #2007 | EnrichedLog |
netcoreapp3.1 | 9.886 μs | 0.1395 μs | 0.1305 μs | 0.0879 | 0.0000 | 0.0000 | 6.28 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net472 | 2.486 μs | 0.0494 μs | 0.0625 μs | 0.1548 | 0.0000 | 0.0000 | 987 B |
| master | SendReceive |
netcoreapp3.1 | 1.971 μs | 0.0395 μs | 0.0540 μs | 0.0138 | 0.0000 | 0.0000 | 984 B |
| #2007 | SendReceive |
net472 | 2.488 μs | 0.0291 μs | 0.0258 μs | 0.1544 | 0.0000 | 0.0000 | 987 B |
| #2007 | SendReceive |
netcoreapp3.1 | 2.007 μs | 0.0390 μs | 0.0365 μs | 0.0137 | 0.0000 | 0.0000 | 984 B |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net472 | 7.659 μs | 0.1206 μs | 0.1069 μs | 0.4462 | 0.0000 | 0.0000 | 2.8 KB |
| master | EnrichedLog |
netcoreapp3.1 | 7.290 μs | 0.1428 μs | 0.1402 μs | 0.0352 | 0.0000 | 0.0000 | 2.61 KB |
| #2007 | EnrichedLog |
net472 | 7.526 μs | 0.1481 μs | 0.1454 μs | 0.4481 | 0.0000 | 0.0000 | 2.8 KB |
| #2007 | EnrichedLog |
netcoreapp3.1 | 7.909 μs | 0.1133 μs | 0.1059 μs | 0.0357 | 0.0000 | 0.0000 | 2.61 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net472 | 856.8 ns | 11.35 ns | 10.06 ns | 0.0682 | 0.0000 | 0.0000 | 433 B |
| master | StartFinishSpan |
netcoreapp3.1 | 830.7 ns | 10.19 ns | 9.53 ns | 0.0062 | 0.0000 | 0.0000 | 432 B |
| master | StartFinishScope |
net472 | 1,022.7 ns | 19.86 ns | 22.87 ns | 0.0806 | 0.0000 | 0.0000 | 514 B |
| master | StartFinishScope |
netcoreapp3.1 | 983.5 ns | 14.47 ns | 13.53 ns | 0.0078 | 0.0000 | 0.0000 | 552 B |
| #2007 | StartFinishSpan |
net472 | 857.1 ns | 9.49 ns | 8.87 ns | 0.0681 | 0.0000 | 0.0000 | 433 B |
| #2007 | StartFinishSpan |
netcoreapp3.1 | 846.8 ns | 14.48 ns | 13.54 ns | 0.0058 | 0.0000 | 0.0000 | 432 B |
| #2007 | StartFinishScope |
net472 | 1,028.2 ns | 12.79 ns | 11.96 ns | 0.0807 | 0.0000 | 0.0000 | 514 B |
| #2007 | StartFinishScope |
netcoreapp3.1 | 1,005.1 ns | 15.52 ns | 13.75 ns | 0.0075 | 0.0000 | 0.0000 | 552 B |
robertpi
approved these changes
Nov 9, 2021
andrewlock
approved these changes
Nov 9, 2021
Member
Code Coverage Report 📊✔️ Merging #2007 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
1 classes were removed from Datadog.Trace in #2007 View the full reports for further details: |
Comment on lines
+650
to
+653
| if (AzureAppServices.Metadata.IsRelevant) | ||
| { | ||
| return AzureAppServices.Metadata.SiteName; | ||
| } |
Member
There was a problem hiding this comment.
This should have been moved up above this inner try because the log message in the catch block does not apply to this.
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.
Fixes missing service names in AAS (Web Apps and Functions) when
DD_SERVICEis not setBefore change:

After change:

@DataDog/apm-dotnet