From 2ee0fdb37d2bba368642ff7b2b188f481fc2083f Mon Sep 17 00:00:00 2001 From: Mark Weitzel Date: Thu, 25 Jun 2020 19:37:41 -0400 Subject: [PATCH 1/4] Fix - Add custom attributes guide. --- .../components/add-custom-attributes.mdx | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/markdown-pages/components/add-custom-attributes.mdx b/src/markdown-pages/components/add-custom-attributes.mdx index c3d25af42..5d585cec4 100644 --- a/src/markdown-pages/components/add-custom-attributes.mdx +++ b/src/markdown-pages/components/add-custom-attributes.mdx @@ -10,31 +10,41 @@ redirects: There are countless filters and pivots you might want to apply to your data. By adding custom attributes to your data, you can see beyond your code and analyze your business in-depth. + + + You can add a `userid` custom attribute to your APM-reported data (`Transaction` and `TransactionError events`) with the Java APM agent's API. - ``` NewRelic.addCustomParameter("userid", userId); ``` + + + + + +Once added, you can run a NRQL query that uses the 'userid' custom attribute. + +Once you have added a custom attribute like 'userid', you can use it to filter and facet your NRQL queries. -Once added, you can run a NRQL query that uses the 'userid' custom attribute. +![UC2-sec1-query.png](https://developer.newrelic.com/content/dam/component-assets/developer/d09-screencap/UC2-sec1-query.png) ``` -- Get a count of errors experienced by a single filtered userid faceted by date and error message SELECT count(*) FROM TransactionError WHERE userid = '616e6472-6577-7340-7961-686f6f2e636f' FACET dateOf(timestamp), `error.message` SINCE 1 week ago ``` -[Learn more about NRQL](https://developer.newrelic.com/technology/nrql) -Once you have added a custom attribute like 'userid', you can use it to filter and facet your NRQL queries. -![UC2-sec1-query.png](https://developer.newrelic.com/content/dam/component-assets/developer/d09-screencap/UC2-sec1-query.png) + + - ### Related Info For more information, see [New Relic APM: Report custom attributes](https://docs.newrelic.com/docs/insights/insights-data-sources/custom-data/add-custom-attributes-new-relic-apm-data) + +For more about the New Relic Query Language, see [Learn more about NRQL](https://developer.newrelic.com/technology/nrql) From f115db6d8f664e61d33e23f68dc19c7835c6b384 Mon Sep 17 00:00:00 2001 From: mmfred <58010132+mmfred@users.noreply.github.com> Date: Fri, 26 Jun 2020 17:32:07 -0700 Subject: [PATCH 2/4] Update src/markdown-pages/components/add-custom-attributes.mdx Co-authored-by: Zack Stickles --- src/markdown-pages/components/add-custom-attributes.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/markdown-pages/components/add-custom-attributes.mdx b/src/markdown-pages/components/add-custom-attributes.mdx index 5d585cec4..f789532ab 100644 --- a/src/markdown-pages/components/add-custom-attributes.mdx +++ b/src/markdown-pages/components/add-custom-attributes.mdx @@ -13,7 +13,9 @@ There are countless filters and pivots you might want to apply to your data. By + + You can add a `userid` custom attribute to your APM-reported data (`Transaction` and `TransactionError events`) with the Java APM agent's API. ``` From 4820acae06e7e58e1f845f4e135cd4d7ce9849d5 Mon Sep 17 00:00:00 2001 From: mmfred <58010132+mmfred@users.noreply.github.com> Date: Fri, 26 Jun 2020 17:32:37 -0700 Subject: [PATCH 3/4] Update src/markdown-pages/components/add-custom-attributes.mdx Co-authored-by: Zack Stickles --- src/markdown-pages/components/add-custom-attributes.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/markdown-pages/components/add-custom-attributes.mdx b/src/markdown-pages/components/add-custom-attributes.mdx index f789532ab..57a1a1205 100644 --- a/src/markdown-pages/components/add-custom-attributes.mdx +++ b/src/markdown-pages/components/add-custom-attributes.mdx @@ -27,6 +27,7 @@ NewRelic.addCustomParameter("userid", userId); + Once added, you can run a NRQL query that uses the 'userid' custom attribute. Once you have added a custom attribute like 'userid', you can use it to filter and facet your NRQL queries. From de918c21a9ba67a993912d86d5c3db1d9993773a Mon Sep 17 00:00:00 2001 From: mmfred <58010132+mmfred@users.noreply.github.com> Date: Fri, 26 Jun 2020 17:32:49 -0700 Subject: [PATCH 4/4] Update src/markdown-pages/components/add-custom-attributes.mdx Co-authored-by: Zack Stickles --- src/markdown-pages/components/add-custom-attributes.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/markdown-pages/components/add-custom-attributes.mdx b/src/markdown-pages/components/add-custom-attributes.mdx index 57a1a1205..a7bdfd2bd 100644 --- a/src/markdown-pages/components/add-custom-attributes.mdx +++ b/src/markdown-pages/components/add-custom-attributes.mdx @@ -42,6 +42,7 @@ SELECT count(*) FROM TransactionError WHERE userid = '616e6472-6577-7340-7961-68 +