You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm initializing AWS SDK v3 clients and tracing them with XRay, but no additional data is being added to the subsegments. The debug logs say that the operations are not whitelisted, even though when I look at the default aws_whitelist.json, I see the services and operations whitelisted -- the case of the services are different.
Call "DynamoDB.UpdateItem" is not whitelisted for additional data capturing. Ignoring.
Call "S3.PutObject" is not whitelisted for additional data capturing. Ignoring.
I've tried creating my own whitelist, but then I get the following error:
TypeError: Cannot read property 'TableName' of undefined
at Object.<anonymous> (/Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/patchers/call_capturer.js:82:24)
at Array.forEach (<anonymous>)
at captureCallParams (/Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/patchers/call_capturer.js:81:12)
at CallCapturer.capture (/Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/patchers/call_capturer.js:58:13)
at Aws.init (/Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/segments/attributes/aws.js:28:27)
at new Aws (/Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/segments/attributes/aws.js:14:10)
at buildAttributesFromMetadata (/Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/patchers/aws3_p.js:20:17)
at /Users/btm296/Development/payments-ws/app/node_modules/aws-xray-sdk-core/dist/lib/patchers/aws3_p.js:92:35
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Looking more into that stack trace, when I get to the captureCallParams() call with my own whitelist, response.request.params is undefined. When I do it with the default waitlist, I get the above error message because it can't find the service DynamoDB (it's expecting dyanmodb) and the function returns. However, if I look at it in a debugger before it returns, response.request.params is still undefined.
The text was updated successfully, but these errors were encountered:
After further investigation, I realized the undefined value response.request.params is unrelated and was a red herring. Once I translated the service name to all lower case, the issue seemed to be resolved. I created a fix in #444.
@blakemorgan so you are seeing the TableName recorded even with a V3 DynamoDB client? The aws_whitelist.json is intended for use with v2 clients, since I believe V3 clients deliver a differently formatted response. But that might not be the case if it's working with your custom whitelist.
@willarmiros I was not seeing the TableName recorded previously, but it was also not working with my custom whitelist. However, when I modified the source code locally with my PR, the debug messages were not appearing anymore, so I assume the default whitelist was being used successfully and that the TableName was being added to the request.
I couldn't confirm the TableName being added in the AWS console because I was just running it locally. I can confirm that before these changes, the TableName was not being added (I noticed that looking in the AWS console and that's what caused me to do more research).
I'm initializing AWS SDK v3 clients and tracing them with XRay, but no additional data is being added to the subsegments. The debug logs say that the operations are not whitelisted, even though when I look at the default aws_whitelist.json, I see the services and operations whitelisted -- the case of the services are different.
Here is how I'm initializing the clients:
And here are the debug messages:
I've tried creating my own whitelist, but then I get the following error:
This is the whitelist I used:
Looking more into that stack trace, when I get to the
captureCallParams()
call with my own whitelist,response.request.params
isundefined
. When I do it with the default waitlist, I get the above error message because it can't find the serviceDynamoDB
(it's expectingdyanmodb
) and the function returns. However, if I look at it in a debugger before it returns,response.request.params
is stillundefined
.The text was updated successfully, but these errors were encountered: