Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Feature Idea: Performance monitoring for NodeJS GraphQL application

performance
feature-idea
rfb
graphql

#1

How can I gain more granular monitoring of my GraphQL NodeJS application?

We have written an NodeJS application that is using Apollo GraphQL server. We are running this app inside of a Docker container, and monitoring the application with New Relic APM NodeJS agent.

I am expecting to see more granular information about each GraphQL resolver, but APM is only displaying information at the top level endpoint (/graphql). This is not very helpful since there is a lot of logic in each resolver that I would like to monitor.

I assume there are ways to add custom NR instrumentation to my code with the NR NodeJS SDK, but I was hoping to get more monitoring out of the box for free (i.e. without instrumentation).

Apollo offers a product called Apollo Engine. This is a specialized solution for Apollo, and I am hoping to stay inside the NR ecosystem, as opposed to adding a separate monitoring solution.

It seems like GraphQL has gained significant adoption. (Netflix, Facebook, Atlassian, Contentful, Github, New Relic) I am surprised that New Relic has not added features specific for GraphQL to APM.

What options does New Relic APM offer for more granular monitoring of GraphQL?


New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


#2

Hi there @dmiyamasu,

You’re correct - the answer here is definitely to make use of custom instrumentation:

I want to assure you that using the Custom Instrumentation is free money-wise (it makes use of our API) but it does require some extra work upfront. The reason for this is that one of the limitations of our agent is that we can only safely instrument a method we recognize as part of a known framework, i.e. methods that we have written instrumentation for. So, if your application is using an “unsupported” framework, you’ll almost certainly need to perform custom instrumentation to surface the transactions that you’re interested in. Custom instrumentation is just a way of extending the list of items that the agent recognizes out-of-the-box. Currently, we do not have any specific written instrumentation for Apollo or GraphQL. You can see the list of everything that we do currently instrument out of the box on our compatibility and requirements doc:


#3

@dmiyamasu - Thanks for sharing such a thorough use case with us. I want to be sure that the Node.js team sees your needs so I have passed along this post! Some of what you mentioned is not available out of the box. @palleman’s suggestion will get you far, and I have also created a Feature Request on your behalf to be sure your needs are heard by the broader New Relic team. :blush:

I have also added a poll above so that others in the community can vote on seeing more of the granular data you mentioned above. Thanks again and don’t forget to vote!


#4

Thank you @Linds & @palleman!

I am curious if you have contacts on the New Relic team who owns the New Relic GraphQL API? I’d love to hear how they chose to monitor their GraphQL application with New Relic APM.