Custom Xray Trace for Graphql Mutation

1

Hi there, I have Xray enabled in my NodeJs Express App with Graphql. I can see segments for other rest endpoints but the other query and mutation that goes through Graphql only /graphql as the path with makes it hard if i need to troubleshoot. Is there a way i can trace GraphQL mutation with AWS xray?

profile picture
已提问 1 年前302 查看次数
1 回答
0

You probably are looking for subsegments. So you would create a subsegment with a namespace of "remote" and add the mutation data in metadata. This way you can filter the traces based on the mutation performed.

https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-nodejs-subsegments.html

已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则