RuntimeTools / appmetrics

Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
https://developer.ibm.com/open/node-application-metrics/
Apache License 2.0
970 stars 125 forks source link

Request for Apollo/Graphql probe #630

Open smeijer opened 4 years ago

smeijer commented 4 years ago

It would be nice to have a probe that is able to log the response time and perhaps also the response size of apollo/graphql (field) resolvers.

That way it becomes easier to trace down the slow resolvers, and focus on optimizing those first.

If we log the path of the resolver, we could even use it to see if deprecated resolvers are still being used, and adjust our deprecation plan based on those statistics.

So stats that would be useful to me are:

Note that a single graphql request, can result in statistics of multiple nested resolvers. Perhaps the apollo tracing data can be used for this. It already contains timings per child resolver.