[APPSEC-61515] Move response headers tagging into Rack middleware#5423
[APPSEC-61515] Move response headers tagging into Rack middleware#5423
Conversation
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 2 partially typed methods, and clears 2 partially typed methods. It decreases the percentage of typed methods from 61.1% to 61.08% (-0.02%). Partially typed methods (+2-2)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: b770ed5 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-10 20:47:30 Comparing candidate commit b770ed5 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 unstable metrics.
|
c95f047 to
a23b282
Compare
ce68b2e to
0246ef1
Compare
cba84d1 to
b915663
Compare
b915663 to
b770ed5
Compare
What does this PR do?
It moved response span tags assignment to be unconditional for the enabled AppSec product.
Motivation:
This is a part of the change required by frontend to be able to have a better views/correlations/etc.
Change log entry
No.
Additional Notes:
Major
Implementation is "best effort" meaning we will not risk buffering response bodies to compute the content length in order to set span tag. Meaning that in old Rails versions 4.x and steaming bodies (IO, yielding, etc) we will not be able to provide
content-lengthspan tag.Minor
This PR includes some fixes to existing contrib as they ignored the Rack triplet specification.
How to test the change?
CI + ST