[Dynamic Instrumentation] DEBUG-5018 Send logs to debugger intake#8092
[Dynamic Instrumentation] DEBUG-5018 Send logs to debugger intake#8092dudikeleti merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes debugger endpoint selection logic by introducing computed properties in AgentConfiguration to determine the appropriate upload endpoints for different types of debugger data. The change ensures logs are sent to the debugger intake (v2 endpoint) for redaction support, aligning with how snapshots are handled.
Changes:
- Added
DebuggerUploadEndpointandDebuggerDiagnosticsUploadEndpointcomputed properties to centralize endpoint fallback logic - Updated upload APIs (Snapshot, Log, and Diagnostics) to use the new centralized properties
- Fixed incorrect method name in
DebuggerFactory.cs
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tracer/src/Datadog.Trace/Agent/DiscoveryService/AgentConfiguration.cs | Added computed properties for centralized endpoint selection with fallback logic |
| tracer/src/Datadog.Trace/Debugger/Upload/SnapshotUploadApi.cs | Updated to use DebuggerUploadEndpoint property instead of inline fallback logic |
| tracer/src/Datadog.Trace/Debugger/Upload/LogUploadApi.cs | Changed from DebuggerEndpoint to DebuggerUploadEndpoint to use v2 intake |
| tracer/src/Datadog.Trace/Debugger/Upload/DiagnosticsUploadApi.cs | Updated to use DebuggerDiagnosticsUploadEndpoint property instead of inline fallback logic |
| tracer/src/Datadog.Trace/Agent/DiscoveryService/DiscoveryService.cs | Removed inline fallback logic, now handled by computed property |
| tracer/src/Datadog.Trace/Debugger/DebuggerFactory.cs | Corrected method name from CreateSnapshotUploader to CreateLogUploader |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BenchmarksBenchmark execution time: 2026-01-22 16:17:02 Comparing candidate commit 7f1d0a5 in PR branch Found 11 performance improvements and 12 performance regressions! Performance is the same for 150 metrics, 19 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1
scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0
scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1
scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0
scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8092) 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 (8092) - mean (68ms) : 67, 70
master - mean (69ms) : 67, 70
section Bailout
This PR (8092) - mean (72ms) : 71, 73
master - mean (72ms) : 71, 73
section CallTarget+Inlining+NGEN
This PR (8092) - mean (1,016ms) : 943, 1089
master - mean (1,024ms) : 938, 1110
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 (8092) - mean (106ms) : 104, 108
master - mean (106ms) : 104, 109
section Bailout
This PR (8092) - mean (107ms) : 106, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (8092) - mean (741ms) : 688, 794
master - mean (738ms) : 685, 792
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8092) - mean (94ms) : 91, 97
master - mean (93ms) : 91, 95
section Bailout
This PR (8092) - mean (95ms) : 94, 96
master - mean (94ms) : 94, 95
section CallTarget+Inlining+NGEN
This PR (8092) - mean (722ms) : 694, 750
master - mean (711ms) : 667, 755
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8092) - mean (93ms) : 90, 95
master - mean (92ms) : 90, 95
section Bailout
This PR (8092) - mean (94ms) : 93, 95
master - mean (93ms) : 92, 94
section CallTarget+Inlining+NGEN
This PR (8092) - mean (638ms) : 623, 652
master - mean (636ms) : 623, 650
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 (8092) - mean (194ms) : 191, 197
master - mean (194ms) : 188, 200
section Bailout
This PR (8092) - mean (198ms) : 195, 201
master - mean (198ms) : 195, 201
section CallTarget+Inlining+NGEN
This PR (8092) - mean (1,131ms) : 1070, 1193
master - mean (1,140ms) : 1054, 1227
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 (8092) - mean (278ms) : 274, 283
master - mean (277ms) : 271, 283
section Bailout
This PR (8092) - mean (279ms) : 275, 284
master - mean (277ms) : 274, 280
section CallTarget+Inlining+NGEN
This PR (8092) - mean (934ms) : 890, 977
master - mean (924ms) : 876, 972
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8092) - mean (274ms) : 265, 282
master - mean (271ms) : 265, 277
section Bailout
This PR (8092) - mean (273ms) : 266, 279
master - mean (271ms) : 267, 274
section CallTarget+Inlining+NGEN
This PR (8092) - mean (932ms) : 886, 978
master - mean (928ms) : 877, 979
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8092) - mean (271ms) : 265, 277
master - mean (272ms) : 265, 278
section Bailout
This PR (8092) - mean (271ms) : 268, 274
master - mean (270ms) : 267, 273
section CallTarget+Inlining+NGEN
This PR (8092) - mean (838ms) : 799, 877
master - mean (831ms) : 811, 850
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) ## Summary of changes Updated logs to use the same preferred endpoint selection as snapshots. ## Reason for change Logs should be sent to the debugger intake so we can redact them like snapshots. ## Implementation details Centralized endpoint fallback selection in AgentConfiguration: DebuggerUploadEndpoint: `DebuggerV2Endpoint ?? DiagnosticsEndpoint` (used by snapshots and logs) DebuggerDiagnosticsUploadEndpoint: `DiagnosticsEndpoint ?? DebuggerEndpoint` (used by diagnostics) Updated upload APIs to use the centralized properties: SnapshotUploadApi → `c.DebuggerUploadEndpoint` LogUploadApi → `c.DebuggerUploadEndpoint` DiagnosticsUploadApi → `c.DebuggerDiagnosticsUploadEndpoint`
Summary of changes
Updated logs to use the same preferred endpoint selection as snapshots.
Reason for change
Logs should be sent to the debugger intake so we can redact them like snapshots.
Implementation details
Centralized endpoint fallback selection in AgentConfiguration:
DebuggerUploadEndpoint:
DebuggerV2Endpoint ?? DiagnosticsEndpoint(used by snapshots and logs)DebuggerDiagnosticsUploadEndpoint:
DiagnosticsEndpoint ?? DebuggerEndpoint(used by diagnostics)Updated upload APIs to use the centralized properties:
SnapshotUploadApi →
c.DebuggerUploadEndpointLogUploadApi →
c.DebuggerUploadEndpointDiagnosticsUploadApi →
c.DebuggerDiagnosticsUploadEndpoint