fix: ensure tracing headers forwarded on all server-side API requests#802
Open
thostetler wants to merge 7 commits intoadsabs:masterfrom
Open
fix: ensure tracing headers forwarded on all server-side API requests#802thostetler wants to merge 7 commits intoadsabs:masterfrom
thostetler wants to merge 7 commits intoadsabs:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #802 +/- ##
========================================
+ Coverage 61.6% 61.6% +0.1%
========================================
Files 312 314 +2
Lines 36000 36090 +90
Branches 1594 1603 +9
========================================
+ Hits 22148 22225 +77
- Misses 13815 13828 +13
Partials 37 37
🚀 New features to boost your workflow:
|
…action Ramda's pick() is a no-op for tracing headers because Node.js IncomingMessage lowercases all keys while TRACING_HEADERS uses mixed case. This utility matches case-insensitively and restores canonical casing for downstream services.
The bootstrap function used by absCanonicalization was not forwarding tracing headers (X-Amzn-Trace-Id, X-Forwarded-For, etc.) to the /accounts/bootstrap API endpoint. Extract headers from the incoming request using pickTracingHeaders and append them to the outgoing fetch.
97c911b to
9a1e8d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Server-side API requests were silently dropping distributed tracing
headers (X-Original-Uri, X-Original-Forwarded-For, X-Forwarded-For,
X-Amzn-Trace-Id). The root cause: Ramda's pick() does exact key
matching, but Node.js IncomingMessage.headers lowercases all keys
while TRACING_HEADERS uses mixed case -- so pick() always returned {}.