graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

Update node-newrelic dependency to v11 to account for certain bug fixes especially high CPU utilization bug

Open emmanuelnk opened this issue 1 year ago • 3 comments

Issue workflow progress

Progress of the issue based on the Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • [ ] 2. A failing test has been provided
  • [ ] 3. A local solution has been provided
  • [ ] 4. A pull request is pending review

Describe the bug Higher CPU utilisation, higher max CPU time per tick. See this issue for the exact problem we are facing:

https://github.com/newrelic/node-newrelic/issues/1775

To Reproduce Steps to reproduce the behavior: N/A -- will try to see if I can create a reproducible issue.

Expected behavior

CPU spikes shouldn't happen when mesh is

Environment:

  • OS: Linux
  • @graphql-mesh/...: latest
  • NodeJS: v20

Additional context Please see the aforementioned issue. I think everything around our problem is well explained there.

emmanuelnk avatar Oct 28 '24 21:10 emmanuelnk

We don't have a control over that dependency which is the official package they provide. However, we are planning to deprecate NewRelic plugin in favor of OTEL plugin with NewRelic integration; https://the-guild.dev/graphql/hive/docs/gateway/monitoring-tracing#exporters

If you have any suggestion about what we can do with the current plugin, let us know. We'd love to help you with that even if it is going to be deprecated.

ardatan avatar Nov 06 '24 13:11 ardatan

@ardatan I managed to force the dependency to version 11 of node-newrelic however I'm still having some issues. I was wondering, how can I go about capturing a CPU profile of mesh? Using the mesh cli I am not sure how to do a node --cpu-prof when uising mesh start -- I want to be able to profile mesh from beginning to end? Any ideas on how to do this?

emmanuelnk avatar Nov 06 '24 15:11 emmanuelnk

^nvm I managed to get a CPU profile using NODE_OPTIONS='--inspect-brk'

emmanuelnk avatar Nov 07 '24 17:11 emmanuelnk