diff --git a/propagators/propagator-aws-xray/src/AWSXRayPropagator.ts b/propagators/propagator-aws-xray/src/AWSXRayPropagator.ts index e06568d9ee..7e3e62bf30 100644 --- a/propagators/propagator-aws-xray/src/AWSXRayPropagator.ts +++ b/propagators/propagator-aws-xray/src/AWSXRayPropagator.ts @@ -99,7 +99,8 @@ export class AWSXRayPropagator implements TextMapPropagator { if (!relevantHeaderKey) { return INVALID_SPAN_CONTEXT; } - const traceHeader = getter.get(carrier, relevantHeaderKey); + let traceHeader = getter.get(carrier, relevantHeaderKey); + traceHeader = Array.isArray(traceHeader) ? traceHeader[0] : traceHeader; if (!traceHeader || typeof traceHeader !== 'string') { return INVALID_SPAN_CONTEXT;