Replies: 2 comments
-
A span hook would definitely work for this use case. The |
Beta Was this translation helpful? Give feedback.
-
@zelongc You can try this:
The The args parameter in the execute function represents the arguments passed to the GraphQL execution function. It can provide you with contextual information about the GraphQL execution, such as the operation name, query/mutation, and variables.
By setting the appropriate tags and attributes on the span object, you can capture the failure information in DataDog and use it to create your dashboard. Remember to customize the condition inside the execute hook to match your criteria for determining a failed request. |
Beta Was this translation helpful? Give feedback.
-
I am woking on a nodejs + koa based graphql server and now needs the APM monitoring for it.
The minimum default option works fne to me, by having
tracer.init()
without any other magic, I can see my spans injested to datadog. Now I am trying to build a dashboard to show the metric of success/failure number given different graphql method. Could anyone point me how do I do it? I found some example kinda useful such asHowever I can't find any reference on what exactly does
args
do. I I want to report this is a failed reqeust even though HTTP status gonna be 200. is it the correct place to do so? and how do I do it?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions