Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
New Relic Node.js agent code base. Developers are welcome to create pull requests here, please see our contributing guidelines. For New Relic technical support, please go to http://support.newrelic.com.
| Date | Stars |
|---|---|
| 2026-07-31 | 1002 |
| 2026-08-06 | 1001 |
| 2026-08-14 | 1001 |
| 2026-08-19 | 1001 |
| 2026-08-20 | 1000 |
| 2026-08-21 | 1000 |
| 2026-08-28 | 1000 |
| 2026-08-30 | 1000 |
| 2026-09-01 | 1000 |
| 2026-09-02 | 1000 |
| 2026-09-03 | 1000 |
| 2026-09-04 | 1000 |
| 2026-09-09 | 1000 |
| 2026-09-10 | 1000 |
| 2026-09-12 | 1000 |
| 2026-09-15 | 1000 |
| 2026-09-16 | 1000 |
| 2026-09-18 | 1000 |
| 2026-09-20 | 1000 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
35.0
growth rate 0.00%/day
<a href="https://opensource.newrelic.com/oss-category/#community-plus"><picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"><source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"><img alt="New Relic Open Source community plus project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"></picture></a>
# New Relic's Node.js agent
[![npm status badge][1]][2] [![Server Smoke Tests][3]][4] [![Node Agent CI][5]][6] [![codecov][7]][8]
This package instruments your application for performance monitoring with [New Relic](https://newrelic.com).
In order to take full advantage of this package, make sure you have a [New Relic account](https://newrelic.com) before starting.
As with any instrumentation tool, please test before using in production.
## Installation
To use New Relic's Node.js agent entails these three steps, which are described in detail below:
- Install [the `newrelic` package](https://www.npmjs.com/package/newrelic)
- Create a base configuration file
- Load the agent in your program
1. To install the agent for performance monitoring, use your favorite npm-based package manager and install the `newrelic` package into your application:
```sh
$ npm install newrelic
```
2. Then, copy the stock configuration file to your program's base folder:
```sh
$ cp ./node_modules/newrelic/newrelic.js ./<your destination>
```
3. Now, add your New Relic license key and application/service name to that file:
```js
/* File: newrelic.js */
'use strict'
/**
* New Relic agent configuration.
*
* See lib/config/default.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/
exports.config = {
app_name: ['Your application or service name'],
license_key: 'your new relic license key',
/* ... rest of configuration .. */
}
```
4. Finally, run your program with the `newrelic` module loaded first by using node's `-r/--require` flag.
```sh
$ node -r newrelic your-program.js
```
If you cannot control how your program is run, you can load the `newrelic` module _before any other module_ in your program.
```js
const newrelic = require('newrelic')
/* ... the rest of your program ... */
```
## Next.js instrumentation
We recommend using the hybrid agent functionality to setup Next.js. Please read our [Next.js instrumentation with hybrid agent](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/extend-your-instrumentation/nextjs-instrumentation) document for more information. The following example applications show how to load the `newrelic` hybrid agent instrumentation, inject browser agent, and deploying to Vercel:
* [App Router example](https://github.com/newrelic/newrelic-node-examples/tree/9fa74c516926014fa33758cbd6e3737334ed4f98/nextjs/nextjs-app-router)
## ECMAScript Modules
If your application is written with `import` and `export` statements in javascript, you are using [ES Modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules) and must bootstrap the agent in a different way.
The New Relic Node.js agent includes support for ES Modules.
### Setup
1. If you rely on a configuration file to run the agent, you must rename the file from `newrelic.js` to `newrelic.cjs` so it can be properly loaded. All the contents of the configuration file will behave the same once you rename. See [CommonJS modules in ESM](https://nodejs.org/api/modules.html#enabling) for more details.
```sh
$ mv newrelic.js newrelic.cjs
```
2. To use the newrelic ESM loader, start your program with node and use the `--import` flag and a path to the loader file, like this:
```Excerpt of 12,445 characters
Read on GitHub1.9k
1.4k
955
390
350
318
230
228
186
149
145
142
141
137
85
67
Snyk bot · @Snyk
39
37
21
15
Would you bet a product on this? Bounded 0–100 and slow moving.
Not classified yet. Classification runs as part of npm run ingest.