APMS-15590 explicitly handle error responses from agent to RC requests#4669
Conversation
|
Thank you for updating Change log entry section 👏 Visited at: 2025-05-19 19:23:37 UTC |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4669 +/- ##
==========================================
- Coverage 97.73% 97.73% -0.01%
==========================================
Files 1453 1455 +2
Lines 87316 87359 +43
Branches 4487 4490 +3
==========================================
+ Hits 85340 85381 +41
- Misses 1976 1978 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Datadog ReportBranch report: ✅ 0 Failed, 21296 Passed, 1373 Skipped, 3m 43.56s Total Time |
aeda810 to
057cd78
Compare
BenchmarksBenchmark execution time: 2025-05-19 19:52:39 Comparing candidate commit bce78bf in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 42 metrics, 2 unstable metrics. scenario:tracing - Propagation - Datadog
|
Strech
left a comment
There was a problem hiding this comment.
Left a few non-blocking suggestion
Revert "RC: include response details in TransportError message" Switching approach: fix InternalErrorResponse#to_s directly instead of changing the raise site. The previous approach only swapped an "#<...:0xADDR>" prefix for a string of mostly-nil predicates without adding signal beyond what PR #4669 already produces.
The Response module does not define to_s, so the super call in InternalErrorResponse#to_s resolves to Object#to_s and emits "#<Datadog::Core::Transport::InternalErrorResponse:0xADDR>" as the prefix of the error message — replacing the wrapped exception info that follows with a memory address. Replace super with self.class so the prefix is the class name rather than the default object identifier. The trailing "error_type:<klass> error:<message>" portion (already useful since PR #4669 added AgentErrorResponse with an informative message) is unchanged. Reported in https://github.com/DataDog/ruby-guild/issues/241.
What does this PR do?
When agent returns an error to RC request, dd-trace-rb will now report this as an agent error.
Before:
After:
Motivation:
Existing reporting can be confusing as to whether there is an issue with the tracer. The new language should make it clear that the tracer is simply reporting an error that the agent produced.
Change log entry
Yes: improve tracer error reporting when agent responds with error responses to remote configuration requests
Additional Notes:
How to test the change?
Unit test added