forked from newrelic/node-newrelic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from newrelic/update-readme
README update
- Loading branch information
Showing
1 changed file
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,83 @@ | ||
[![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus) | ||
|
||
# New Relic Next.js Instrumentation [build badges go here when available] | ||
# New Relic Next.js Instrumentation [![Next.js Instrumentation CI][1]][2] | ||
|
||
>[Brief description - what is the software and what value does it provide? How often should users expect to get releases? How is versioning set up? What are some next phases for the project or how will it evolve?] | ||
New Relic's official Next.js framework instrumentation for use with the New Relic [Node.js agent](https://github.com/newrelic/node-newrelic). | ||
|
||
## Installing and using [project name] | ||
This module is a dependency of the agent and is installed by default when you install the agent. | ||
|
||
> [Link to the relevant information for this agent on docs.newrelic.com. Create a bulleted list with links to install, usage, and getting started info on docs. Avoid duplicating information from docs in the open source content to ensure there's no inconsistency between the two.] | ||
This module provides instrumentation for Server-Side Rendering via [getServerSideProps](https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props), [Middleware](https://nextjs.org/docs/middleware), and New Relic Transaction naming for both page and server requests. | ||
|
||
## Installation | ||
|
||
## Building | ||
Typically, most users use the version auto-installed by the agent. You can see agent install instructions [here](https://github.com/newrelic/node-newrelic#installation-and-getting-started). | ||
|
||
>[**Optional** - Include this section if users will need to follow specific instructions to build the software from source. Be sure to include any third-party build dependencies that need to be installed separately. As mentioned, link to docs for install info that's already included there. Remove this section if it's not needed.] | ||
In some cases, installing a specific version is ideal. For example, new features or major changes might be released via a major version update to this module, prior to inclusion in the main New Relic Node.js Agent. | ||
|
||
``` | ||
npm install @newrelic/next | ||
``` | ||
|
||
```js | ||
node -r @newrelic/next your-program.js | ||
``` | ||
|
||
If you cannot control how your program is run, you can load the `@newrelic/next` module before any other module in your program. | ||
|
||
```js | ||
require('@newrelic/next') | ||
|
||
/* ... the rest of your program ... */ | ||
``` | ||
|
||
For more information, please see the agent [installation guide][3]. | ||
|
||
## Getting Started | ||
|
||
Our [API and developer documentation](http://newrelic.github.io/node-newrelic/docs/) for writing instrumentation will be of help. We particularly recommend the tutorials and various "shim" API documentation. | ||
|
||
## Usage | ||
|
||
Next.js is a full stack React Framework. This module augments the Node.js New Relic agent, thus any client side actions will not be instrumented. | ||
|
||
```js | ||
How to inject browser snippet will go here | ||
``` | ||
|
||
For more information, please see the agent [compatibility and requirements][4]. | ||
|
||
## Testing | ||
|
||
>[**Optional** - Include instructions on how to run tests if we include tests with the codebase. Remove this section if it's not needed.] | ||
The module includes a suite of unit and functional tests which should be used to | ||
verify that your changes don't break existing functionality. | ||
|
||
All tests are stored in `tests/` and are written using | ||
[Tap](https://www.npmjs.com/package/tap) with the extension `.test.js`(unit), or `.tap.js`(versioned). | ||
|
||
To run the full suite, run: `npm test`. | ||
|
||
Individual test scripts include: | ||
|
||
``` | ||
npm run unit | ||
npm run versioned | ||
``` | ||
|
||
## Support | ||
|
||
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: | ||
|
||
>[Add the url for the support thread here: discuss.newrelic.com] | ||
**Support Channels** | ||
|
||
* [New Relic Documentation](https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/introduction-new-relic-nodejs): Comprehensive guidance for using our platform | ||
* [New Relic Community](https://discuss.newrelic.com/tags/c/telemetry-data-platform/agents/nodeagent): The best place to engage in troubleshooting questions | ||
* [New Relic Developer](https://developer.newrelic.com/): Resources for building a custom observability applications | ||
* [New Relic University](https://learn.newrelic.com/): A range of online training for New Relic users of every level | ||
* [New Relic Technical Support](https://support.newrelic.com/) 24/7/365 ticketed support. Read more about our [Technical Support Offerings](https://docs.newrelic.com/docs/licenses/license-information/general-usage-licenses/support-plan). | ||
|
||
## Contribute | ||
|
||
We encourage your contributions to improve [project name]! Keep in mind that 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. | ||
We encourage your contributions to improve Next.js instrumentation module! Keep in mind that 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 (which is required if your contribution is on behalf of a company), drop us an email at [email protected]. | ||
|
||
|
@@ -40,5 +92,11 @@ If you would like to contribute to this project, review [these guidelines](./CON | |
To all contributors, we thank you! Without your contribution, this project would not be what it is today. We also host a community project page dedicated to [Project Name](<LINK TO https://opensource.newrelic.com/projects/... PAGE>). | ||
|
||
## License | ||
[Project name] is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License. | ||
>[If applicable: The [project name] also uses source code from third-party libraries. Full details on which libraries are used and the terms under which they are licensed can be found in the third-party notices document.] | ||
New Relic Next.js instrumentation is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License. | ||
New Relic Next.js instrumentation also uses source code from third-party libraries. Full details on which libraries are used and the terms under which they are licensed can be found in the third-party notices document. | ||
|
||
[1]: https://github.com/newrelic/newrelic-node-nextjs/workflows/Next.js%20Instrumentation%20CI/badge.svg | ||
[2]: https://github.com/newrelic/node-newrelic-nextjs/actions | ||
[3]: https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/install-nodejs-agent | ||
[4]: https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent | ||
|