Reapply "[SymDB] DEBUG-5086 SymDB upload enable when DI is disabled"#8565
Conversation
0f7a0c2 to
beacd9e
Compare
BenchmarksBenchmark execution time: 2026-05-06 10:05:05 Comparing candidate commit beacd9e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 61 known flaky benchmarks, 26 flaky benchmarks without significant changes.
|
…uploader (#8589) ## Summary of changes Removes allocation and delay during startup due to JSON parsing in Symbol uploader ## Reason for change After we merged #8565 which enables symbol DB uploading by default, we saw a significant delay during startup (10% impact), even when we ultimately bail out of uploading (due to insufficient agent version, for example). On analysis, a big part of this is likely due to the third-party-module-names.json file. We were embedding this JSON file in the assembly, and then parsing it using Newtonsoft.JSON, adding each item to a `HashSet<string>`, and then building an `ImmutableHashSet<string>` from this. The harness around this process used a `Lazy<bool>` to avoid running this parsing immediately, however there were code paths that check `ThirdPartyModules.IsValid` during startup, which immediately trigger the loading synchronously on the startup hotpath. ## Implementation details Ultimately, the JSON layer is an unnecessary abstraction layer. We can build the `HashSet<string>` directly from an embedded collection of `string`, and that avoids all of the parsing overhead, as well as `HashSet<string>` resizing, and the final copy. Additionally, made some other minor changes: - Use `HashSet<string>` instead of `ImmutableHashSet<string>` as it's faster for lookups, and as it's a private field there's no need for the Immutable guarantees. - Remove the "IsValid" path entirely, as it's no longer necessary - minor: Move the `ThirdPartyModules` type to its own folder (as not just _used_ by exception replay, it's used by the symbol uploads too) ## Test coverage Added some simple unit tests for the `ThirdyPartyModules` type, mostly to verify that the hashset can be created correctly (and to codify some assumptions like case sensitivity).
Summary of changes
Datadog.Traceenables SymDB upload independently of Dynamic Instrumentation being enabled.Reason for change
Implementation details
587c0655017587728bfd90fbc842bf448491af07(Revert "[SymDB] DEBUG-5086 SymDB upload enable when DI is disabled" #8550).Instrumentation.cs,DebuggerManager.cs,DebuggerSettings.cs, and the corresponding unit tests inDebuggerManagerTests,DebuggerManagerDynamicTests, andDebuggerSettingsTests.Test coverage
Other details