Skip to content

Commit 6d55aa9

Browse files
authored
Add comment about order of baggage items (#34527)
Follow up from #33777
1 parent c684217 commit 6d55aa9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ private static void RecordRequestStartEventLog(HttpContext httpContext)
307307
fieldValue = headers[fieldName];
308308
});
309309

310+
// AddBaggage adds items at the beginning of the list, so we need to add them in reverse to keep the same order as the client
311+
// By contract, the propagator has already reversed the order of items so we need not reverse it again
310312
// Order could be important if baggage has two items with the same key (that is allowed by the contract)
311313
if (baggage is not null)
312314
{

0 commit comments

Comments
 (0)