Skip to content

Commit

Permalink
Edited to make more active and guidelike.
Browse files Browse the repository at this point in the history
made the language more active.
  • Loading branch information
mmfred authored Aug 18, 2020
1 parent 7b146a9 commit 78c110e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/markdown-pages/collect-data/add-custom-attributes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ There are countless filters and pivots you might want to apply to your data. By

A common pattern when using custom attributes is to capture user information, such as name, ID, email, and more. This allows you to 'link' your operational data with your business data. For example, if you have the user information, you tie together your service desk and CRM data with the operational data in New Relic.

## Create a custom attribute

<Steps>

<Step>

You can add a `userid` custom attribute to your APM-reported data (`Transaction` and `TransactionError events`) with the opensource Java APM agent's API.
Use the open source Java APM agent's API to add a `userid` custom attribute to your APM-reported data, `Transaction` and `TransactionError events`.

```
NewRelic.addCustomParameter("userid", userId);
Expand All @@ -41,9 +43,9 @@ NewRelic.addCustomParameter("userid", userId);

<Step>

Once added, you can run a NRQL query that uses the 'userid' custom attribute.
After you add the `userid` custom attribute, run a NRQL query that uses it.

Once you have added a custom attribute like 'userid', you can use it to filter and facet your NRQL queries.
As the query shows, the `userid` attribute enables you to filter and facet your NRQL queries.

![custom-attribute-query.png](../../images/custom-attributes/custom-attribute-query.png)

Expand Down

0 comments on commit 78c110e

Please sign in to comment.