aws / aws-xray-sdk-node

The official AWS X-Ray SDK for Node.js.
Apache License 2.0
266 stars 155 forks source link

Error with XRay and EventBridgeClient #664

Open allen-monark opened 1 month ago

allen-monark commented 1 month ago

Hello, I am getting an error when using aws-xray-sdk with @aws-sdk/client-eventbridge.

I tried to instrument event bridge using the captureAWSv3Client like so:

import AWSXRay from 'aws-xray-sdk';
import { EventBridgeClient } from '@aws-sdk/client-eventbridge';

const eventClient = AWSXRay.captureAWSv3Client(new EventBridgeClient());

and I get an error: TypeError: Cannot read properties of undefined (reading 'remove') at Object.captureAWSClient [as captureAWSv3Client].

Here are the version I am using: "aws-xray-sdk": "^3.9.0", "@aws-sdk/client-eventbridge": "^3.215.0",

allen-monark commented 1 month ago

Looking at the issue of @Jesusdiazrivero, it was fixed by upgrading the version to 3.9.0. However, in my case, XRay version was already at 3.9.0 when I encountered the issue. Still not sure how to go about on this one.