Add process tags to runtime metrics & dynamic instrumentation metric probes#7871
Add process tags to runtime metrics & dynamic instrumentation metric probes#7871lucaspimentel merged 12 commits intomasterfrom
Conversation
… probes # Conflicts: # tracer/src/Datadog.Trace/Debugger/DebuggerFactory.cs # tracer/src/Datadog.Trace/TracerManagerFactory.cs
6dfff5b to
efa9f9d
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7871) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (69ms) : 67, 71
master - mean (68ms) : 67, 70
section Bailout
This PR (7871) - mean (73ms) : 71, 74
master - mean (72ms) : 71, 73
section CallTarget+Inlining+NGEN
This PR (7871) - mean (1,015ms) : 953, 1078
master - mean (1,010ms) : 950, 1069
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (106ms) : 104, 109
master - mean (106ms) : 104, 109
section Bailout
This PR (7871) - mean (107ms) : 106, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (7871) - mean (738ms) : 680, 795
master - mean (738ms) : 679, 797
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (94ms) : 92, 96
master - mean (94ms) : 91, 96
section Bailout
This PR (7871) - mean (95ms) : 94, 96
master - mean (95ms) : 94, 96
section CallTarget+Inlining+NGEN
This PR (7871) - mean (721ms) : 690, 753
master - mean (718ms) : 684, 753
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (93ms) : 90, 95
master - mean (92ms) : 90, 94
section Bailout
This PR (7871) - mean (94ms) : 93, 95
master - mean (93ms) : 92, 95
section CallTarget+Inlining+NGEN
This PR (7871) - mean (639ms) : 622, 655
master - mean (637ms) : 621, 652
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (196ms) : 190, 203
master - mean (196ms) : 189, 203
section Bailout
This PR (7871) - mean (202ms) : 194, 210
master - mean (198ms) : 195, 201
section CallTarget+Inlining+NGEN
This PR (7871) - mean (1,137ms) : 1066, 1209
master - mean (1,130ms) : 1065, 1195
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (279ms) : 273, 285
master - mean (281ms) : 274, 288
section Bailout
This PR (7871) - mean (280ms) : 275, 286
master - mean (280ms) : 275, 286
section CallTarget+Inlining+NGEN
This PR (7871) - mean (936ms) : 891, 981
master - mean (928ms) : 881, 975
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (272ms) : 267, 276
master - mean (272ms) : 266, 277
section Bailout
This PR (7871) - mean (272ms) : 267, 278
master - mean (272ms) : 268, 276
section CallTarget+Inlining+NGEN
This PR (7871) - mean (930ms) : 883, 977
master - mean (928ms) : 877, 978
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7871) - mean (273ms) : 265, 281
master - mean (272ms) : 266, 279
section Bailout
This PR (7871) - mean (274ms) : 266, 282
master - mean (272ms) : 266, 278
section CallTarget+Inlining+NGEN
This PR (7871) - mean (839ms) : 824, 855
master - mean (838ms) : 816, 860
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This comment has been minimized.
This comment has been minimized.
|
|
||
| // two views on the same data | ||
| public static readonly List<string> TagsList = GetTagsList(); | ||
| public static readonly ReadOnlyCollection<string> TagsList = GetTagsList().AsReadOnly(); |
There was a problem hiding this comment.
(I was going to leave comments in all the other places you used [] to change them to Array.Empty<string>() like in DebuggerFactory, but instead...)
I tried a few things to make it easier to avoid the heap allocation with the [] initializer. Turns out if you change this type to IReadOnlyCollection<string> then [] will use Array.Empty<string>() (since it's guaranteed that the collection won't be mutated).
If you do that, you also don't need AsReadOnly() here because List<T> implements IReadOnlyCollection<T>, avoiding another allocation for the ReadOnlyCollection<T>. And you can change that Array.Empty<string>() in DebuggerFactory back to [] the way you had it originally and keep all the other [] 😅
You'll also have to change IList<string> to IReadOnlyCollection<T> in a few other places to fix compiler errors. I'll leave suggestions for you.
| public static readonly ReadOnlyCollection<string> TagsList = GetTagsList().AsReadOnly(); | |
| public static readonly IReadOnlyCollection<string> TagsList = GetTagsList(); |
tracer/src/Datadog.Trace/RemoteConfigurationManagement/RemoteConfigurationManager.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/RemoteConfigurationManagement/Protocol/RcmClientTracer.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/RemoteConfigurationManagement/Protocol/RcmClientTracer.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/RemoteConfigurationManagement/Protocol/RcmClientTracer.cs
Outdated
Show resolved
Hide resolved
## Summary of changes signature changed in #7871, and since the benchmark CI step was broken for another reason, I missed that. ## Reason for change ## Implementation details ## Test coverage ## Other details <!-- Fixes #{issue} --> <!--⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->
Summary of changes
add process tags as constant tags for both runtime metrics and the metrics sent by dynamic instrumentation probes
Reason for change
AIDM-195
Implementation details
Test coverage
Will append existing integration tests
Other details