Skip to content

Commit 2f37714

Browse files
Merge pull request #773 from newrelic/edit-pass
Edit pass
2 parents 5178ed9 + e8d3a21 commit 2f37714

File tree

2 files changed

+57
-37
lines changed

2 files changed

+57
-37
lines changed

src/markdown-pages/automate-workflows/get-started-new-relic-cli.mdx

+52-32
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tags:
2323

2424
<Intro>
2525

26-
Access the New Relic platform from the comfort of your terminal: you can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. Our CLI has been designed for automating common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage.
26+
Access the New Relic platform from the comfort of your terminal. You can use the New Relic CLI to manage entity tags, define workloads, record deployment markers, and much more. In short, you can use the CLI to automate common tasks in your DevOps workflow. This guide walks you through the essentials of New Relic CLI, from install and configuration to basic usage.
2727

2828
<Video id="6uw3tu0d23" type="wistia"/>
2929
</Intro>
@@ -32,45 +32,45 @@ Access the New Relic platform from the comfort of your terminal: you can use the
3232

3333
For this guide you just need:
3434

35-
1. A New Relic [user key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key): you can create this from the [API keys UI](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher)
36-
2. An [instrumented application](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/install-agent) in your New Relic account
35+
- Your New Relic [personal API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#personal-api-key), which you can create from the **Account settings** of your New Relic account
36+
- An [instrumented application](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/install-agent) in your New Relic account
3737

3838
<Steps>
3939
<Step>
4040

41-
## Install the New Relic CLI
41+
Install the New Relic CLI
4242

43-
The New Relic CLI can be downloaded via [Homebrew](https://brew.sh/) (macOS), [Scoop](https://scoop.sh/) (Windows), and [Snapcraft](https://snapcraft.io/) (Linux). You can also download [pre-built binaries](https://github.com/newrelic/newrelic-cli/releases) for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer.
43+
Download the New Relic CLI for your operating system, as described below. You can also download [pre-built binaries](https://github.com/newrelic/newrelic-cli/releases) for all platforms, including .deb and .rpm packages, and our Windows x64 .msi installer.
4444

45-
### Linux
45+
**Linux**
4646

4747
<>
4848

49-
With [Snapcraft](https://snapcraft.io/) installed, run:
49+
Using [Snapcraft](https://snapcraft.io/), run:
5050

5151
```sh
5252
sudo snap install newrelic-cli
5353
```
5454

5555
</>
5656

57-
### macOS
57+
**macOS**
5858

5959
<>
6060

61-
With [Homebrew](https://brew.sh/) installed, run:
61+
Using [Homebrew](https://brew.sh/), run:
6262

6363
```sh
6464
brew install newrelic-cli
6565
```
6666

6767
</>
6868

69-
### Windows
69+
**Windows**
7070

7171
<>
7272

73-
With [Scoop](https://scoop.sh/) installed, run:
73+
Using [Scoop](https://scoop.sh/), run:
7474

7575
```sh
7676
scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git
@@ -81,11 +81,11 @@ scoop install newrelic-cli
8181

8282
</Step><Step>
8383

84-
## Create your New Relic CLI profile
84+
Create your New Relic CLI profile.
8585

86-
Now that you've installed the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts.
86+
After you install the New Relic CLI, it's time to create your first profile. Profiles contain credentials and settings that you can apply to any CLI command, which is useful when switching between accounts.
8787

88-
To create your first CLI profile, run the [`profiles add`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_profile_add.md) command. Note that you need to set the [region](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers) of your New Relic account: use `-r` to set either `us` or `eu` (this is required).
88+
Run the [`profiles add`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_profile_add.md) command:
8989

9090
```sh lineNumbers=false
9191
# Create the tutorial account for the US region
@@ -94,29 +94,41 @@ newrelic profiles add -n tutorial --apiKey YOUR_NEW_RELIC_USER_KEY -r YOUR_REGIO
9494
newrelic profiles default -n tutorial
9595
```
9696

97+
<Callout variant="important">
98+
99+
You must set the [region](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers) of your New Relic account. Use `-r` to set either `us` or `eu`.
100+
101+
</Callout>
102+
97103
</Step><Step>
98104

99-
## Get your application details
105+
Get your application details.
100106

101-
In this example, you are going to add tags to the application you've instrumented with New Relic. [Tags](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/tagging-use-tags-organize-group-what-you-monitor) are key-value pairs that can help you organize and filter your entities. An [entity](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/what-entity-new-relic) (for example, an application) can have a maximum of 100 key-value pairs tied to it.
107+
Now, add tags to the application you've instrumented with New Relic. [Tags](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/tagging-use-tags-organize-group-what-you-monitor) are key-value pairs that can help you organize and filter your entities. An [entity](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/what-entity-new-relic) (for example, an application) can have a maximum of 100 key-value pairs tied to it.
102108

103109
Before searching for your application using the New Relic CLI, write down or copy your [Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) and the [name of your application in New Relic](https://docs.newrelic.com/docs/agents/manage-apm-agents/app-naming/name-your-application) - you need both to find applications in the New Relic platform.
104110

105111
</Step><Step>
106112

107-
The New Relic CLI can retrieve your application details as a JSON object.
113+
Retrieve your application details as a JSON object.
108114

109-
To search for your APM application use the [`apm application search`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_apm_application_search.md) command. If you get an error, check that the account ID and application name you provided are correct.
115+
To search for your APM application, use the [`apm application search`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_apm_application_search.md) command:
110116

111117
```bash lineNumbers=false
112118
newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP
113119
```
114120

121+
<Callout variant="tip">
122+
123+
If you get an error, check that your account ID and application name are correct.
124+
125+
</Callout>
126+
115127
</Step><Step>
116128

117-
If the account ID is valid, and the application name exists in your account, `apm application search` yields data similar to this example.
129+
Find the `guid` value.
118130

119-
When you've successfully searched for your application, look for the `guid` value. It's a unique identifier for your application. You should copy it or write it down.
131+
If the account ID is valid, and the application name exists in your account, `apm application search` yields data similar to this example:
120132

121133
```json lineNumbers=false
122134
[
@@ -134,27 +146,31 @@ When you've successfully searched for your application, look for the `guid` valu
134146
]
135147
```
136148

149+
When you've successfully searched for your application, look for the `guid` value. It's a unique identifier for your application. You should copy it or write it down.
150+
137151
</Step><Step>
138152

139-
## Add a simple tag to your application
153+
Add a simple tag to your application.
140154

141155
Now that you have the GUID, you can point the New Relic CLI directly at your application. Adding a tag is the simplest way to try out the CLI capabilities (don't worry, tags can be deleted by using [`entity tags delete`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_delete.md)).
142156

143-
Let's suppose that you want to add an environment tag to your application. Go ahead and add the `dev:testing` tag⁠ (or any other key-value pair) to your application using the [`entities tags create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_create.md) command.
157+
Here, you add an environment tag to your application. Add the `dev:testing` tag⁠ (or any other key-value pair) to your application using the [`entities tags create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_create.md) command:
144158

145159
```sh lineNumbers=false
146160
newrelic entity tags create --guid YOUR_APP_GUID --tag devkit:testing
147161
```
148162

149163
</Step><Step>
150164

151-
What if you want to add multiple tags? Tag sets come to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example:
165+
Add tag sets.
166+
167+
What if you want to add multiple tags? Tag sets to the rescue! While tags are key-value pairs separated by colons, tag sets are comma separated lists of tags. For example:
152168

153169
```txt copyable=false
154170
tag1:value1,tag2:value2
155171
```
156172

157-
To add multiple tags at once to your application, modify and run the following snippet.
173+
To add multiple tags to your application at once, modify and run this snippet:
158174

159175
```sh lineNumbers=false
160176
newrelic entity tags create --guid YOUR_APP_GUID --tag tag1:test,tag2:test
@@ -168,15 +184,17 @@ Adding tags is an asynchronous operation: this means it could take a while for t
168184

169185
</Step><Step>
170186

171-
You've created and added some tags to your application, but how do you know they're there? You need to retrieve your application's tags.
187+
Retrieve your application's tags.
188+
189+
You've created and added some tags to your application, but to test that they're working, you need to retrieve them.
172190

173-
To retrieve your application's tags, use the [`entity tags get`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_get.md) command.
191+
Run the [`entity tags get`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity_tags_get.md) command:
174192

175193
```sh
176194
newrelic entity tags get --guid YOUR_APP_GUID
177195
```
178196

179-
All tags associated with your application are retrieved as a JSON array.
197+
All tags associated with your application are retrieved as a JSON array:
180198

181199
```json lineNumbers=false
182200
[
@@ -198,21 +216,23 @@ All tags associated with your application are retrieved as a JSON array.
198216

199217
</Step><Step>
200218

201-
## Bonus step: Create a deployment marker
219+
Bonus step: create a deployment marker.
202220

203221
Deployments of applications often go wrong. [Deployment markers](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments) are labels that, when attached to your application data, help you track deployments and troubleshoot what happened.
204222

205-
To create a deployment marker, run the [`apm deployment create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_apm_deployment_create.md) command using the same Application ID from your earlier search.
223+
To create a deployment marker, run the [`apm deployment create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_apm_deployment_create.md) command using the same application ID from your earlier search:
206224

207225
```bash lineNumbers=false
208226
newrelic apm deployment create --applicationId YOUR_APP_ID --revision $(git describe --tags --always)
209227
```
210228

211229
</Step><Step>
212230

213-
Notice that the JSON response includes the revision and timestamp of the deployment. This workflow could be built into a continuous integration or continuous deployment (CI/CD) system to help indicate changes in your application's behavior after deployments.
231+
Check the JSON response for the revision and timestamp of the deployment.
232+
233+
You can build this workflow into a continuous integration or continuous deployment (CI/CD) system to indicate changes in your application's behavior after deployments.
214234

215-
Here is an example.
235+
Here's an example:
216236

217237
```json lineNumbers=false
218238
{
@@ -230,6 +250,6 @@ Here is an example.
230250

231251
## Next steps
232252

233-
Have a look at [all the available commands](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic.md). For example, you could create a [New Relic workflow](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/new-relic-one-workloads-isolate-resolve-incidents-faster) using [`workload create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_workload_create.md)
253+
Have a look at [all the available commands](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic.md) in the New Relic CLI. For example, you can create a [New Relic workflow](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/new-relic-one-workloads-isolate-resolve-incidents-faster) using [`workload create`](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_workload_create.md)
234254

235255
If you'd like to engage with other community members, visit our [New Relic Explorers Hub](https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit) page. We welcome feature requests or bug reports on [GitHub](https://github.com/newrelic/newrelic-cli).

src/markdown-pages/build-apps/howto-use-nrone-table-components.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default class Nr1HowtoAddTimePicker extends React.Component {
7171
</Step>
7272
<Step>
7373

74-
Run the demo application
74+
Run the demo application.
7575

7676
Change the directory back to `nr1-how-to/create-a-table`. Before you can load the demo application, you need to [update its unique id](https://developer.newrelic.com/build-tools/new-relic-one-applications/guide-to-authentication--data-access--and-permissions) by invoking the New Relic One CLI.
7777

@@ -131,7 +131,7 @@ import {
131131
</Step>
132132
<Step>
133133

134-
Add a basic Table component
134+
Add a basic Table component.
135135
Locate the empty `GridItem` in `index.js`: This is where you start building the table.
136136

137137
Add the initial `<Table>` component. The `items` property collects the data by calling `_getItems()`, which contains sample values.
@@ -145,11 +145,11 @@ Add the initial `<Table>` component. The `items` property collects the data by c
145145
</Step>
146146
<Step>
147147

148-
Add the header and rows
148+
Add the header and rows.
149149

150150
As the [`Table`](https://developer.newrelic.com/client-side-sdk/index.html#components/Table) component renders a fixed number of header cells and rows, your next step is adding header components, as well as a function that returns the required table rows.
151151

152-
Inside of the `Table` component, add the `TableHeader` and then a `TableHeaderCell` child for each heading.
152+
Inside the `Table` component, add the `TableHeader` and then a `TableHeaderCell` child for each heading.
153153

154154
Since you don't know how many rows you'll need, your best bet is to call a function to build as many `TableRows` as items returned by `_getItems()`.
155155

@@ -184,7 +184,7 @@ Take a look at the application running in New Relic One: you should see somethin
184184
</Step>
185185
<Step>
186186

187-
Replace standard table cells with smart cells
187+
Replace standard table cells with smart cells.
188188

189189
The New Relic One library includes cell components that can automatically format certain data types, like users, metrics, and entity names.
190190

0 commit comments

Comments
 (0)