Files
klz-cables.com/.pnpm-store/v10/files/e6/0eb8fe4d1e90b3d42eb92365b90a8bf507abaca773ac1b4ee1740a4716bdbbdc185e0a5b48d365ffb7cfb86c075e69e89e8b2066389d377f3a9b5bf31e31b4
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

30 lines
750 B
Plaintext

import { winterCGHeadersToDict, httpHeadersToSpanAttributes, getClient } from '@sentry/core';
/**
* Extracts HTTP request headers as span attributes and optionally applies them to a span.
*/
function addHeadersAsAttributes(
headers,
span,
) {
if (!headers) {
return {};
}
const headersDict =
headers instanceof Headers || (typeof headers === 'object' && 'get' in headers)
? winterCGHeadersToDict(headers )
: headers;
const headerAttributes = httpHeadersToSpanAttributes(headersDict, getClient()?.getOptions().sendDefaultPii ?? false);
if (span) {
span.setAttributes(headerAttributes);
}
return headerAttributes;
}
export { addHeadersAsAttributes };
//# sourceMappingURL=addHeadersAsAttributes.js.map