[NO-TICKET] ActionController - Honor resource override - #6280
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 0aa1612 | Docs | View more details | Give us feedback! |
BenchmarksBenchmark execution time: 2026-09-03 15:12:35 Comparing candidate commit 0aa1612 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 1 unstable metrics.
|
| begin | ||
| # We repeat this in both start and at finish because the resource may have changed during the request | ||
| trace.resource = span.resource unless payload[:headers][:request_exception] | ||
| if trace.resource == tracing_context[:dd_request_trace_resource] && !payload[:headers][:request_exception] |
There was a problem hiding this comment.
Could we also treat !trace.resource_override? as eligible here? TraceOperation defines trace.resource = nil as clearing the override, but this equality then fails and Rack falls back to its generic resource.
A small spec for that transition plus !trace.resource_override? || ... would preserve the existing no-override behavior.
mabdinur
left a comment
There was a problem hiding this comment.
The resource-ownership approach matches the existing Rack precedence, and the tests cover overrides both before controller start and during request processing. I left one non-blocking edge-case note.
What does this PR do?
Honor resource override in ActionController
Motivation:
Internal support
Change log entry
Yes. Preserve custom trace resource names for ActionController requests.
Additional Notes:
How to test the change?