New Relic's official Koa framework instrumentation for use with the New Relic Node.js Agent.
This module is a dependency of the agent and will be installed by default upon installing the agent.
Typically, most users will use the version auto-installed by the agent. You can see agent install instructions here.
In some cases, installing a specific version may be ideal. For example: new features or major changes may be released via major version update to this module, prior to inclusion in the main New Relic Node.js Agent.
npm install @newrelic/koa
// index.js
require('@newrelic/koa')
For more information, please see the agent installation guide.
Our API and developer documentation for writing instrumentation will be of help. We particularly recommend the tutorials and various "shim" API documentation.
In addition to the Koa framework, we support additional specific routing modules.
- koa-router
- koa-route
For more information, please see the agent compatibility and requirements.
The module includes a suite of unit and functional tests which should be used to verify your changes don't break existing functionality.
All tests are stored in tests/
and are written using
Tap with the extension .tap.js
.
To run the full suite, run: npm test
.
Individual test scripts include:
npm run unit
npm run versioned
New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. You can find this project's topic/threads here: https://discuss.newrelic.com/c/support-products-agents/node-js-agent/.
We encourage your contributions to improve New Relic Koa Instrumentation! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.
If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].
New Relic Koa Instrumentation is licensed under the Apache 2.0 License.
New Relic Koa Instrumentation also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.