-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Module did not self-register #258
Comments
Thank you for reporting this, @frankda . Would you be able to provide us with a repro case with which we can test? |
Please find this repo https://github.com/frankda/newrelic-native-metrics-context-aware-example for minimal reproducible example when use @newrelic/native-metrics in multiple node worker thread. Will get We encounter this issue when using native-metrics with serverless framework and serverless-offline plugin. Don't have this issue with node v16 and older version of serverless. I suspect newer serverless-offline is using worker thread and native-metrics is not context aware. To fix this, can update https://github.com/newrelic/node-native-metrics/blob/main/src/native_metrics.cpp#L20 to
I can create a PR for this if needed |
You're certainly welcome to open a PR, though I should note that we don't recommend enabling the native metrics plugin when operating in Serverless Mode, and as of v11, we don't recommend running the agent in worker threads. |
Description
Hi I got error:
After upgrade node version from 16 to 20. Tried
npm rebuild
but doesn't work. According to this post nodejs/node#21783 (comment), it might resolve this issue. Could you please consider update according to this post?Meanwhile, I will try to pull and build the module myself with solution and see if it can fix this issue.
Expected Behavior
Sorry I cannot provide more information as I am new to newrelic and I don't know how to reproduce with a minimal reproducible example.
Troubleshooting or NR Diag results
Steps to Reproduce
Your Environment
System Version: macOS 14.2 (23C64)
Kernel Version: Darwin 23.2.0
Additional context
The text was updated successfully, but these errors were encountered: