Quick start part 1: Generate a simple example app
To build a New Relic One app, you need a paid or Developer Edition New Relic account. If you don't yet have an account, you can sign up for a Developer Edition account and start building.
If this is your first time building a New Relic One app, do the following:
Go to one.newrelic.com.
Follow the instructions, which will walk you through:
Quick start part 2: Copy/paste this example
Now that you have the CLI and have locally served a Nerdpack (if not, follow the instructions in the Build a New Relic One application launcher above), you can move on to adding functionality to your Nerdlets.
If you have a New Relic account with APM data, the following code will generate two charts using the New Relic One component library. These charts respect the time picker range selected in New Relic One, and interact with the navigation object to launch an APM Overview dashboard on an onClick event.
Paste the following into your Nerdlet’s
index.js file, replacing the
<YOUR_ACCOUNT_ID> with your New Relic account ID: