From c3342bda4280b52e3cc0c11abf6a47868ada4099 Mon Sep 17 00:00:00 2001 From: jjllee Date: Thu, 1 May 2025 10:24:12 -0700 Subject: [PATCH 1/2] test(instrumentation-aws-sdk): update client in bedrock-runtime tests to use NodeHttpHandler instead of the new default NodeHttp2Handler --- .../test/bedrock-runtime.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts index 49bdc4d242..32c80bbc28 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts @@ -43,6 +43,7 @@ import { import { AwsCredentialIdentity } from '@aws-sdk/types'; import * as path from 'path'; import { Definition, back as nockBack } from 'nock'; +import { NodeHttpHandler } from '@smithy/node-http-handler'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { @@ -88,7 +89,11 @@ describe('Bedrock', () => { }; } - const client = new BedrockRuntimeClient({ region, credentials }); + const client = new BedrockRuntimeClient({ + region, + credentials, + requestHandler: new NodeHttpHandler(), + }); let nockDone: () => void; beforeEach(async function () { From c5d728c249a0c691692ae75502aa3a140a917156 Mon Sep 17 00:00:00 2001 From: jjllee Date: Thu, 1 May 2025 10:47:21 -0700 Subject: [PATCH 2/2] add comment --- .../test/bedrock-runtime.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts index 32c80bbc28..f66118a918 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts @@ -89,6 +89,7 @@ describe('Bedrock', () => { }; } + // Use NodeHttpHandler to use HTTP instead of HTTP2 because nock does not support HTTP2 const client = new BedrockRuntimeClient({ region, credentials,