-
Notifications
You must be signed in to change notification settings - Fork 400
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
Node 11 & 12 Support #279
Comments
Node 11/12 Module Load changes break our shim._moduleRoot / shim.require() code paths. Current agent tests do not yet catch the bug. [UPDATE]: Known Impacts:
This issue has a corresponding internal NR issue for tracking. |
Is there an expected timing here? This is blocking us upgrading Node versions. |
### 5.10.0 (2019-06-11): * The agent now allows installation on node v11 and v12. This change relaxes the engines restriction to include node v11 and v12. This does not constitute official support for those versions, and users on those versions may run into subtle incompatibilities. For those users who are interested in experimenting with the agent on the v11 and v12, we are tracking relevant issues here: #279. * Lambda invocations ended with promises will now be recorded properly. Previously, the lambda instrumentation was not intercepting the promise resolution/rejection returned from a lambda handler. The instrumentation now properly observes the promise, and ends the transaction when the promise has finished. * Lambda invocations will only attempt to end the related transaction a single time. In the event of two lambda response events (e.g. callback called, and a promise returned), the agent would attempt to end the transaction twice, producing an extraneous empty payload. The agent now limits itself to a single end call for a given transaction. * The agent will now properly end transactions in the face of uncaught exceptions while in serverless mode. * Enables ability to migrate to Configurable Security Policies (CSP) on a per agent basis for accounts already using High Security Mode (HSM). When both HSM and CSP are enabled for an account, an agent (this version or later) can successfully connect with either or the appropriate configured. has been added as part of the preconnect payload.
Hi @johncblandii, The engine restriction change was just released and is available with Official support timing is still TBD. Thanks, Michael |
BEAUTIFUL! We just reverted some docker images for lower Node versions, but look forward to upgrading them now. Thanks a ton! |
Not that I think there will be any, but how do you want issues reported? In this issue or log them separately? I have just updated one of our apps to 5.10 on Node 12.3.1. |
So I only came upon this because I noticed that an app (our canary app) which we had upgraded NR to 5.9.x had stopped reporting transactions. Investigation led me to this Issue. After 15 min of running with 5.10.0 I am sill not seeing any transactions logged. I have also tried running through locally to see what the NR log shows but nothing useful there. I get these 4 lines and thats it regardless of running a number transactions through:
|
@drwharris Thanks for giving the agent a try with Node 12!
If you have an issue related to Node 11 or Node 12, please report it to this thread for the time being. If things get out of control we'll start breaking them up into individual issues, but a single thread seems like the best path forward for now. Also -- expect issues :). We're opening up the For issues not related to Node 11/12 -- your best bet will be to use our official support channels ([email protected]) or New Relic's explorer's hub community forums. Or, you know, if you have a quick fix a PR discussion is always welcome :)
Are you saying this application isn't reporting transaction when you switch to Node 12? If so, could you share your package.json requirments and and/or give us a brief overview of your application/service architecture? (express serving URLs? hapi behind a cache layer? TypeScript dynamically compiled on the fly and etc.). The more we know about your system the better we'll be able to track down what's going on with your system. Thanks again for giving the agent a try with Node 12. |
It tried 5.10 on two projects on the same machine, the first project worked great, but the second project I get an error building the native-metrics:
Both programs are using the same node install/ same g++/make/python |
@jbecwar looks like you have an outdated version of nan installed. Make sure you have the most up-to-date version in your lockfile. |
@astormnewrelic, thanks for following up.
Thats correct
Is this what you want:
Application is a Message Queue (Rabbit) Consumer which takes messages from a Queue, post processes them to validate data, make them consistent, add information like Geo coordinates, weather, etc and then inserts into a database. Its written in typescript, compiled to JS at build time and deployed to a Docker image. Here is the NR output from the build:
It runs as a Fargate task (Non-host controlled Docker Container) on AWS. Hope thats enough info? |
I had a similar issue. Delete node_modules and do npm install and it fixed the issue for me. |
@ccope Thanks for the tip! On the project that wasn't working the package-lock.json had:
The one that worked had:
if I replace the bad native-metrics object with the good one, it builds perfect. Only down side is if I regenerate the package-lock.json it reverts. It looks like the native-metrics project has an open PR for the issue: https://github.com/newrelic/node-native-metrics/pull/60/commits |
|
Does anyone have any advise on this? |
@drwharris Thanks! The information you provided is great -- we've got an internal issue opened and we'll try to track down the issue when we tackle formal support for Node 12. We don't have a clear timeline yet for when we'll be doing that, but we'll be updating this issue as we progress. If you (or anyone) is urgently impacted by your application's not reporting in via Node 12 we recommend you roll back to an officially supported version of NodeJS. The in meanwhile -- using your set of dependencies we spun up a simple express application, and data recorded correctly. So that means there's no gigantic failure state with your set of dependencies, which means the problem is likely down to the instrumentation on a specific module. Can you
Also -- have you tried upping the logs to trace level and checking if there's anything unexpected showing up there?
|
Will do. Its not difficult for me to replicate this.
We aren't using Express, we're using Restify.
Would you like me to make you a RO contributor on our repository so you can see 1st hand?
Yes, this was the first thing I did. |
A stand-alone reproduction would be our first choice, but if you're comfortable giving out RO access and pointing at an example then that's a close-second. |
Just realised I said this was using Restify. This particular app is not using any http front end, thats the opposite side of this app, our Message Queue Producer. This app is our Message Queue Consumer, so just sits and listens for messages on a Rabbit MQ queue. I will try and put together a quick repro. |
Here is a repro. It starts up a consumer and pushes something into the queue every 5 seconds. After 10 min of this running I still had nothing I can see as why in the log and nothing online. (note you will need to place a license_key in the newrelic.js file). It expects a local instance of Rabbit MQ with default guest/guest user. You can get this simply with docker using
|
@drwharris Perfect, thank you. Looking at the reproduction case, I noticed this was present in the trace logs for V12 and it wasn't present for V10.
Its too early to say why this is happening -- hopefully this is just a change in how Node 12 resolves its module paths and we can make adjustments. Mainly mentioning this in case something jumps out for you'all. We'll keep you posted as we discover more. |
@drwharris TL;DR -- keep an eye out for an agent release coming "soon" :) We've looked into this and it seems like there's been some changes in how the NodeJS internals handle module loading, and these changes don't play nicely with a combination the patching we do for instrumentation and the relative paths we use in the amqp instrumentation. We're testing out some changes that should fix this and we'll have a fix out soon. Keep an eye on the agent release page for a fix. |
Also, for additional clarity for anyone reviewing this, this is the same issue documented above "Node 11/12 Module Load changes break our shim._moduleRoot / shim.require() code paths.". |
Thank all. Waiting (im)patiently :) |
Alguna novedad? |
^^ what he said! @astormnewrelic ? |
We're nearly three months on. Any word @astormnewrelic ? |
It was released a while back. |
@Oxicode @drwharris @jufemaiz Thanks all for checking in! Steady goes the course. We're still planning/working-on formal support for the latest version of Node, and we're still interested in any bug/problems/behaviors folks have with running the current agent with the latest version of Node. So keep any problems you're seeing coming! |
|
node-gyp depends on python. You’ll need to install python. Recommend using a build container 👍🏼 |
I understand that, but
|
Perhaps worthwhile registering at https://github.com/newrelic/node-native-metrics/issues ❓ |
We shipped official Node 12 parity support yesterday! Here's the release notes for more information on release 6.0.0. There's one final potential issue with native metrics you can follow here: newrelic/node-native-metrics#62. For the most part, issues we've seen with native metrics modules have been around needing to upgrade dependencies to build against the Node 12 API but we do have fall-back binaries for install now. Closing this issue out in the main agent repo. |
The agent does not yet officially support Node versions 11 & 12.
We will be opening up the
engines
restriction, in a release to follow soon, to allow those who would like to take advantage of agent features on newer versions of node. Using the agent in these situations will come with some additional risk. While the agent should work well for most standard cases, there may be some subtly broken features.This issue will serve as a place to add any discovered issues/incompatibilities with Node 11 & 12. It should help inform if there are any risks too large to take on in your own project and will also help inform our official support as we tackle that.
The text was updated successfully, but these errors were encountered: