From 754e74dab9e2c6b03a8e652f76307d0b3b378e2a Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:20:50 -0800 Subject: [PATCH] chore(aws-sdk): remove dependency on SQS type from JS SDK v2 --- .../src/services/sqs.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts index 07cedaa25d..4e7d0c72b4 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts @@ -25,7 +25,7 @@ import { } from '@opentelemetry/api'; import { pubsubPropagation } from '@opentelemetry/propagation-utils'; import { RequestMetadata, ServiceExtension } from './ServiceExtension'; -import type { SQS } from 'aws-sdk'; +import type { SQS } from '../aws-sdk.types'; import { AwsSdkInstrumentationConfig, NormalizedRequest, @@ -119,7 +119,9 @@ export class SqsServiceExtension implements ServiceExtension { const entries = request.commandInput?.Entries; if (Array.isArray(entries)) { entries.forEach( - (messageParams: SQS.SendMessageBatchRequestEntry) => { + (messageParams: { + MessageAttributes: SQS.MessageBodyAttributeMap; + }) => { messageParams.MessageAttributes = injectPropagationContext( messageParams.MessageAttributes ?? {} );