aws/aws-xray-sdk-node

How to change name for the service wrapped by AWSXray.captureAWSv3Client()

vertisan opened this issue · 5 comments

Hi,
For some reason, I need to set up 2, identical infrastructures and after that, I need to recognize i.e. via filters which are A and which are B.
I'm using the DynamoDB and SQS wrapped by AWSXray.captureAWSv3Client() but as a result, it shows that both infrastructures (A & B) use.. the same DynamoDB instance.
Is it possible to change the service name if it's wrapped via AWSXray.captureAWSv3Client()?

Just to be clear, you are using 2 different set up like below,

client -----> middleware (instrumented with X-Ray JS SDK) -------> Dynamo

I'm not sure if I understand what do you mean by using same dynamodb instance. Are you inferring that in your service map you have 2 graphs and both of the dynamodb node has the same name?

Almost, I have 2 service branches (API) leading to one DynamoDB even though they are 2 separate services (one is on AWS, the other locally).

Might be related to #460 . The javascript v3 aws-sdk does not allow the x-ray sdk to capture additional details like queue name and table name and treats them all the same... It's a pain to be honest and if you need this, I suggest you use the v2 aws-sdk instead

I also would like to know why this is happening. There is a global warning to migrate to aws-sdk-v3 urgent, but doing that I'm still stuck with the awful graph shown each service like Dynamo and S3 like a single node instead of tables and buckets.