ardatan / graphql-mesh

🕸️ GraphQL Federation Framework for any API services such as REST, OpenAPI, Swagger, SOAP, gRPC and more...
https://the-guild.dev/graphql/mesh
MIT License
3.28k stars 342 forks source link

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

Open emmanuelnk opened 1 week ago

emmanuelnk commented 1 week ago

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.


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:

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

ardatan commented 9 hours ago

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.

emmanuelnk commented 7 hours ago

@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?