From d44a5737b8a53e0a4adf36e5d6c7e01794b37158 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:39:56 -0800 Subject: [PATCH 01/10] chore: add syntax highlighting --- ...scim-support-automated-user-management.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx b/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx index 3ba744de047..617dfe027be 100644 --- a/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx +++ b/src/content/docs/accounts/accounts/automated-user-management/scim-support-automated-user-management.mdx @@ -229,7 +229,7 @@ Supported actions are: > Example request: - ``` + ```json POST /Groups { @@ -243,7 +243,7 @@ Supported actions are: Example response: - ``` + ```json 201 Created { @@ -274,7 +274,7 @@ Supported actions are: Example response: - ``` + ```json 200 OK { @@ -305,7 +305,7 @@ Supported actions are: Example response: - ``` + ```json 200 OK { @@ -336,7 +336,7 @@ Supported actions are: > In the request, include the fields that you want to change. If you include the `members` field, the group’s users will be adjusted to match the contents of the members field. Example request: - ``` + ```json PUT /Groups/YOUR_GROUP_ID { @@ -349,7 +349,7 @@ Supported actions are: Example response: - ``` + ```json 200 OK { @@ -374,7 +374,7 @@ Supported actions are: > Example request: - ``` + ```json PATCH /Groups/YOUR_GROUP_ID { @@ -402,7 +402,7 @@ Supported actions are: > Example request: - ``` + ```json PATCH /Groups/YOUR_GROUP_ID { @@ -432,7 +432,7 @@ Supported actions are: > Example request: - ``` + ```json PATCH /Groups/YOUR_GROUP_ID { @@ -479,7 +479,7 @@ Supported actions are: > Example request: - ``` + ```json POST /Users { @@ -504,7 +504,7 @@ Supported actions are: Example response: - ``` + ```json 201 Created { @@ -546,7 +546,7 @@ Supported actions are: Example response: - ``` + ```json 200 OK { @@ -588,7 +588,7 @@ Supported actions are: Example response: - ``` + ```json 200 OK { @@ -630,7 +630,7 @@ Supported actions are: > In the request, include the fields that you want to change. If you include the `groups` field, the user’s groups will be adjusted to match the contents of the groups field. Example request: - ``` + ```json PUT /Users/YOUR_USER_ID { @@ -646,7 +646,7 @@ Supported actions are: Example response: - ``` + ```json 200 OK { @@ -682,7 +682,7 @@ Supported actions are: > Example request: - ``` + ```json PATCH /Users/YOUR_USER_ID { From f9b894b2fc432236e0036422a32f98e7a3370919 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:46:31 -0800 Subject: [PATCH 02/10] chore: add syntax highlightling --- .../tutorial-manage-users-groups-scim.mdx | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/content/docs/accounts/accounts/automated-user-management/tutorial-manage-users-groups-scim.mdx b/src/content/docs/accounts/accounts/automated-user-management/tutorial-manage-users-groups-scim.mdx index 2ef3d8f8a98..fe31545a328 100644 --- a/src/content/docs/accounts/accounts/automated-user-management/tutorial-manage-users-groups-scim.mdx +++ b/src/content/docs/accounts/accounts/automated-user-management/tutorial-manage-users-groups-scim.mdx @@ -55,7 +55,7 @@ Rather than reading the entire SCIM protocol RFCs, there are three specific sect For all requests to the SCIM API, you must provide the bearer token in an `Authorization` header. Here's an example with `curl`: -``` +```shell curl -X 'GET' -H 'Accept: application/json' -H "Authorization: Bearer $TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users' ``` @@ -64,7 +64,7 @@ Any request in the rest of this tutorial will receive a **401 Unauthorized* Example response: - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -89,7 +89,7 @@ We recommend providing the following attributes for the best user experience: * `name.familyName` The user's last or family name. * `timezone` The user's time zone in IANA Time Zone database format. -``` +```shell curl -X 'POST' -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", @@ -149,7 +149,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -162,7 +162,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -181,11 +181,11 @@ You can use the SCIM API to send a `POST` request to `/scim/v2/Groups` to create * `displayName` The group name. -``` +```shell curl -X 'POST' -H 'Content-Type: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Groups' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" @@ -216,7 +216,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -229,7 +229,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -250,14 +250,14 @@ In this tutorial, you'll be searching for specific users and groups, but that's To retrieve a user by email, send a `GET` request to `/scim/v2/Users` with a `filter` query parameter. The `filter` parameter must be URL encoded. -``` +```shell curl -X 'GET' -H 'Accept: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users' --get --data-urlencode 'filter=userName eq "bjensen@example.com"' ``` Example response: - ``` + ```json { "totalResults": 1, "schemas": [ @@ -297,14 +297,14 @@ Example response: Similarly, send a `GET` request to `/scim/v2/Groups` with a `filter` query parameter to retrieve a group by name. -``` +```shell curl -X 'GET' -H 'Accept: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Groups' --get --data-urlencode 'filter=displayName eq "Example Group"' ``` Example response: - ``` + ```json { "totalResults": 1, "schemas": [ @@ -335,7 +335,7 @@ The SCIM API supports both `PUT` and `PATCH` methods for updating users. Refer t New Relic does **not** require all user attributes be included in the request body, only the attributes you want to update are necessary. Send a `PUT` request to `/scim/v2/Users/${ID}` to update the user. -``` +```shell curl -X 'PUT' -H 'Content-Type: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users/5a1d580f-323c-450c-8c62-479b5c9085d6' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", @@ -379,7 +379,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -404,7 +404,7 @@ The SCIM API supports both `PUT` and `PATCH` methods for updating groups. This t Send a `PATCH` request to `/scim/v2/Groups/${ID}` to update group members. -``` +```shell curl -X 'PATCH' -H 'Content-Type: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Groups/df2b9a04-0426-4a3e-bf5f-54d5341f4e5b' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" @@ -452,7 +452,7 @@ To remove a user from a group, use the following operation parameters: * `path` set to `members` * `value` set to a list of `{"value": "${USER_ID}"}` with each user ID to remove from the group -``` +```shell curl -X 'PATCH' -H 'Accept: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Groups/df2b9a04-0426-4a3e-bf5f-54d5341f4e5b' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" @@ -493,7 +493,7 @@ Example response: To remove a user from an authentication domain, send a `DELETE` request to `/scim/v2/Users/${ID}`. -``` +```shell curl -X 'DELETE' -H 'Accept: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users/d0f4d8e3-5413-4894-a8f9-de709994e18c' ``` @@ -505,7 +505,7 @@ Example response: Similarly, to remove a group from your authentication domain, send a `DELETE` request to `/scim/v2/Groups/${ID}`. -``` +```shell curl -X 'DELETE' -H 'Accept: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Groups/df2b9a04-0426-4a3e-bf5f-54d5341f4e5b' ``` @@ -537,28 +537,28 @@ Valid values for `nrUserType` include: To create a new `Basic user` send a `POST` request `/scim/v2/Users` and include the custom New Relic schema extension: -``` +```shell curl -X 'POST' -H 'Content-Type: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", @@ -602,7 +602,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -615,7 +615,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" @@ -630,16 +630,16 @@ EOF To update a user's type, send a `PUT` request `scim/v2/Users/${ID}` and include the custom New Relic schema extension: -``` +```shell curl -X 'PUT' -H 'Content-Type: application/json' -H "Authorization: Bearer $YOUR_TOKEN" 'https://scim-provisioning.service.newrelic.com/scim/v2/Users' --data-binary @- < - ``` + ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", @@ -683,7 +683,7 @@ EOF - ``` + ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" From b715fd932e2386a1ac7451801f751efcdb368f45 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:49:59 -0800 Subject: [PATCH 03/10] chore: syntax highlighting --- .../rackspace-cloud-load-balancer-plugin.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/accounts/install-new-relic/partner-based-installation/rackspace-cloud-load-balancer-plugin.mdx b/src/content/docs/accounts/install-new-relic/partner-based-installation/rackspace-cloud-load-balancer-plugin.mdx index bcac56f4bdc..33a1ac6ecbf 100644 --- a/src/content/docs/accounts/install-new-relic/partner-based-installation/rackspace-cloud-load-balancer-plugin.mdx +++ b/src/content/docs/accounts/install-new-relic/partner-based-installation/rackspace-cloud-load-balancer-plugin.mdx @@ -30,11 +30,11 @@ Make sure your system has these components installed: If you have load balancers in multiple regions, configure a separate plugin for each region. Always use lower case characters for the region's name in your yml file. For more information about YAML parsing, see [http://yaml-online-parser.appspot.com/](http://yaml-online-parser.appspot.com/ "Link opens in a new window"). -``` +```shell wget https://github.com/newrelic-platform/newrelic_rackspace_load_balancers_plugin/archive/1.0.0.zip ``` -``` +```shell bundle install -binstubs ./bin/newrelic_rs --sample-config ``` @@ -42,7 +42,7 @@ bundle install -binstubs 1. Download the zip file from GitHub: 2. Extract the contents into the directory you want to use. 3. Run the following commands from within this directory to get the gem setup: -4. Modify the **config/newrelic_plugin.yml** with your New Relic [license key](/docs/subscriptions/license-key), Rackspace username and API key, and the region where your load balancer sits. Be sure to use lower case characters for the region name. +4. Modify the `config/newrelic_plugin.yml` with your New Relic [license key](/docs/subscriptions/license-key), Rackspace username and API key, and the region where your load balancer sits. Be sure to use lower case characters for the region name. 5. Start the agent: `./bin/newrelic_rs`. 6. Verify that the output says `gathering xx statistics`. From ff0ff20e5cccc85e3c38053428d726aea32fdc0b Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:51:39 -0800 Subject: [PATCH 04/10] chore: NRQL syntax --- .../original-product-based-pricing/switch-new-models.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/accounts/original-accounts-billing/original-product-based-pricing/switch-new-models.mdx b/src/content/docs/accounts/original-accounts-billing/original-product-based-pricing/switch-new-models.mdx index 4c1fa97aec4..a9388662e5e 100644 --- a/src/content/docs/accounts/original-accounts-billing/original-product-based-pricing/switch-new-models.mdx +++ b/src/content/docs/accounts/original-accounts-billing/original-product-based-pricing/switch-new-models.mdx @@ -71,9 +71,9 @@ For our newer pricing model, data ingest is one billing factor. To better unders * Use our [data ingest cost estimator](https://newrelic.com/blog/nerdlog/estimate-data-cost). * Go to the data ingest UI: from the [user menu](/docs/accounts/accounts-billing/general-account-settings/intro-account-settings), click **Manage your data**, then click **Data ingestion**. -* To do more in-depth analysis than the UI provides, use [NRQL queries of your usage](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/usage-queries-alerts). Here's an example of breaking down [`Metric` data](/docs/telemetry-data-platform/understand-data/new-relic-data-types/#dimensional-metrics) by the top 10 metric names. Note that some metrics are not data ingest metrics and are not billable. To run different analyses, you might also try faceting by `appName` or `Host`. - ``` - FROM Metric SELECT bytecountestimate()/10e8 as 'GB Estimate' +* To do more in-depth analysis than the UI provides, use [NRQL queries of your usage](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/usage-queries-alerts). Here's an example of breaking down [`Metric` data](/docs/telemetry-data-platform/understand-data/new-relic-data-types/#dimensional-metrics) by the top 10 metric names. Note that some metrics are not data ingest metrics and are not billable. To run different analyses, you might also try faceting by `appName` or `host`. + ```sql + FROM Metric SELECT bytecountestimate()/10e8 AS 'GB Estimate' SINCE 7 DAYS AGO FACET metricName LIMIT 10 TIMESERIES 1 day ``` From ab90b942fdf203396721895ba353b9a1399b22d3 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:57:35 -0800 Subject: [PATCH 05/10] fix: codeblock --- .../browser-pro-features/session-replay.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content/docs/browser/browser-monitoring/browser-pro-features/session-replay.mdx b/src/content/docs/browser/browser-monitoring/browser-pro-features/session-replay.mdx index cb0ceaf6f1e..d92a6ee802f 100644 --- a/src/content/docs/browser/browser-monitoring/browser-pro-features/session-replay.mdx +++ b/src/content/docs/browser/browser-monitoring/browser-pro-features/session-replay.mdx @@ -93,10 +93,9 @@ For more details on session replay, see the following sections: * Add our CSS class `nr-mask` or attribute `data-nr-mask` to your webpage HTML. For example, to mask an account ID from showing in the URL, add `nr-mask` to the `
` containing the account ID: - ````html + ```html
Account ID: 99881123
``` - ```` These options use an asterisk (\*) to mask all text in that element, hiding the actual text but revealing the number of characters entered. However, asterisks are not valid numbers, so masking number type-specific fields such as telephone or credit card numbers will result in a blank field in a replay. @@ -250,7 +249,7 @@ For more details on session replay, see the following sections: Here's an example of adding the `crossorigin="anonymous"` attribute: - ``` + ```html ``` From c046d26908a5f52d7c61834714777f5a2ccd4e73 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:02:08 -0800 Subject: [PATCH 06/10] chore: add syntax hightlighting --- .../new-relic-browser/installation/update-browser-agent.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/browser/new-relic-browser/installation/update-browser-agent.mdx b/src/content/docs/browser/new-relic-browser/installation/update-browser-agent.mdx index 3bc61b4480e..55cebd45349 100644 --- a/src/content/docs/browser/new-relic-browser/installation/update-browser-agent.mdx +++ b/src/content/docs/browser/new-relic-browser/installation/update-browser-agent.mdx @@ -123,7 +123,7 @@ Use any of the following options to access the browser JavaScript snippet needed 1. Find your browser application ID and license key: Follow standard procedures to use the [New Relic UI](/docs/browser/new-relic-browser/installation-configuration/copying-your-browser-monitoring-license-key-app-id) or the [REST API](/docs/apm/apis/browser-examples-v2/adding-or-listing-browser-apps-api-v2#specific-browser-app). 2. Set your browser application ID and license key immediately after the snippet. - ``` + ```js NREUM.info = { applicationID: "YOUR-APPLICATION-ID", licenseKey: "YOUR-BROWSER-LICENSE-KEY" }; ``` From 4c2702dae46a6436b6b562ecf6abec39e155b225 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:06:49 -0800 Subject: [PATCH 07/10] fix: broken nrql --- ...viewtiming-async-or-dynamic-page-details.mdx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/content/docs/browser/new-relic-browser/page-load-timing-resources/pageviewtiming-async-or-dynamic-page-details.mdx b/src/content/docs/browser/new-relic-browser/page-load-timing-resources/pageviewtiming-async-or-dynamic-page-details.mdx index 7e132d9a1c4..19f2bf493d5 100644 --- a/src/content/docs/browser/new-relic-browser/page-load-timing-resources/pageviewtiming-async-or-dynamic-page-details.mdx +++ b/src/content/docs/browser/new-relic-browser/page-load-timing-resources/pageviewtiming-async-or-dynamic-page-details.mdx @@ -346,8 +346,10 @@ Here are some sample queries for the event data to help you get started. > Show the 95th percentile of first paint and first contentful paint over a time series: - ``` - SELECT FILTER(percentile(firstPaint, 95), where(timingName = 'firstPaint')) as 'fp', FILTER(percentile(firstContentfulPaint, 95), where(timingName = 'firstContentfulPaint')) as 'fcp' FROM PageViewTiming TIMESERIES 1 minute SINCE 1 hour ago + ```sql + SELECT filer(percentile(firstPaint, 95), WHERE timingName = 'firstPaint') AS 'fp', + filter(percentile(firstContentfulPaint, 95), WHERE timingName = 'firstContentfulPaint') AS 'fcp' + FROM PageViewTiming TIMESERIES 1 minute SINCE 1 hour ago ``` @@ -357,8 +359,10 @@ Here are some sample queries for the event data to help you get started. > Show the 95th percentile of interaction to next paint over a time series, faceted by transaction name and interaction type: - ``` - SELECT percentile(interactionToNextPaint, 75) as 'INP' FROM PageViewTiming WHERE timingName = 'interactionToNextPaint' TIMESERIES 1 minute FACET browserTransactionName, interactionType SINCE 3 hours ago + ```sql + SELECT percentile(interactionToNextPaint, 75) AS 'INP' + FROM PageViewTiming WHERE timingName = 'interactionToNextPaint' + TIMESERIES 1 minute FACET browserTransactionName, interactionType SINCE 3 hours ago ``` @@ -368,8 +372,9 @@ Here are some sample queries for the event data to help you get started. > Show a histogram of interaction to next paint timings faceted by first interaction time ranges: - ``` - FROM PageViewTiming SELECT percentile(interactionToNextPaint, 75) WHERE entityGuid = ‘xyz’ FACET `pageUrl` SINCE 24 hours ago + ```sql + FROM PageViewTiming SELECT percentile(interactionToNextPaint, 75) + WHERE entityGuid = 'xyz' FACET pageUrl SINCE 24 hours ago ``` From c05e33b77434be9f130aaa725d9822a40fa47dcd Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:08:43 -0800 Subject: [PATCH 08/10] chore: syntax highlighting --- .../change-tracking/change-tracking-cli.mdx | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/content/docs/change-tracking/change-tracking-cli.mdx b/src/content/docs/change-tracking/change-tracking-cli.mdx index f1321289d2f..1e1764e6d25 100644 --- a/src/content/docs/change-tracking/change-tracking-cli.mdx +++ b/src/content/docs/change-tracking/change-tracking-cli.mdx @@ -35,41 +35,41 @@ The CLI has a range of options (shown below), but the `create` command marks a s This is the syntax to create a marker: -``` +```shell newrelic entity deployment create [flags] ``` Here's an example: -``` +```shell newrelic entity deployment create --guid INSERT_YOUR_GUID_HERE --version <1.0.0> ``` ## Primary (parent) options -``` --h, --help help for create --g, --guid string the entity GUID to create change tracker --v, --version string the tag names to add to the entity - --changelog string a URL for the changelog or list of changes if not linkable - --commit string the commit identifier, for example, a Git commit SHA - --deepLink string a link back to the system generating the deployment - --deploymentType string type of deployment, one of BASIC, BLUE_GREEN, CANARY, OTHER, ROLLING or SHADOW - --description string a description of the deployment - --groupId string string that can be used to correlate two or more events --t --timestamp int64 the start time of the deployment, the number of milliseconds since the Unix epoch, defaults to now --u --user string username of the deployer or bot +```shell +[output] -h, --help help for create +[output] -g, --guid string the entity GUID to create change tracker +[output] -v, --version string the tag names to add to the entity +[output] --changelog string a URL for the changelog or list of changes if not linkable +[output] --commit string the commit identifier, for example, a Git commit SHA +[output] --deepLink string a link back to the system generating the deployment +[output] --deploymentType string type of deployment, one of BASIC, BLUE_GREEN, CANARY, OTHER, ROLLING or SHADOW +[output] --description string a description of the deployment +[output] --groupId string string that can be used to correlate two or more events +[output] -t --timestamp int64 the start time of the deployment, the number of milliseconds since the Unix epoch, defaults to now +[output] -u --user string username of the deployer or bot ``` ## Options inherited from parent commands -``` --a, --accountId int the account ID to use. Can be overridden by setting NEW_RELIC_ACCOUNT_ID - --debug debug level logging - --format string output text format [JSON, Text, YAML] (default "JSON") - --plain output compact text - --profile string the authentication profile to use - --trace trace level logging +```shell +[output] -a, --accountId int the account ID to use. Can be overridden by setting NEW_RELIC_ACCOUNT_ID +[output] --debug debug level logging +[output] --format string output text format [JSON, Text, YAML] (default "JSON") +[output] --plain output compact text +[output] --profile string the authentication profile to use +[output] --trace trace level logging ``` ## What's next [#whats-next] From 678230264b17b93ba293f9c2f2340c8cbea39811 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:09:39 -0800 Subject: [PATCH 09/10] chore: add syntax highlighting --- src/content/docs/codestream/troubleshooting/using-wsl.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/codestream/troubleshooting/using-wsl.mdx b/src/content/docs/codestream/troubleshooting/using-wsl.mdx index 77831fd6f02..c66fed3ee38 100644 --- a/src/content/docs/codestream/troubleshooting/using-wsl.mdx +++ b/src/content/docs/codestream/troubleshooting/using-wsl.mdx @@ -9,7 +9,7 @@ To use CodeStream and WSL (Windows Subsystem for Linux), follow these steps: 1. Make sure Git is installed on the Windows machine, as well as in your WSL distro. While the versions installed between the two could differ, its best to ensure the Windows version matches whatever is installed in your WSL distro. 2. Clone your git repo into your WSL distro (for example, `~/code/YOUR_PROJECT_FOLDER`). 3. On Windows, allow git to communicate over this UNC path by marking the directory as `safe`. Do this in your Windows terminal with this command, replacing `YOUR_DISTRO`, `YOUR_USERNAME`, and `YOUR_PROJECT_FOLDER` to match your configuration: - ``` + ```shell git config --global --add safe.directory '//wsl.localhost/YOUR_DISTRO/home/YOUR_USERNAME/code/YOUR_PROJECT_FOLDER' ``` From e58a0ebda41a39e977402dd529c0f06ec7e293b4 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:24:24 -0800 Subject: [PATCH 10/10] chore: add syntax highlighting to code blocks --- ...le-monitoring-custom-events-attributes.mdx | 72 +++++++++---------- 1 file changed, 33 insertions(+), 39 deletions(-) diff --git a/src/content/docs/data-apis/custom-data/custom-events/report-mobile-monitoring-custom-events-attributes.mdx b/src/content/docs/data-apis/custom-data/custom-events/report-mobile-monitoring-custom-events-attributes.mdx index 55a629ad9a6..af2bd089370 100644 --- a/src/content/docs/data-apis/custom-data/custom-events/report-mobile-monitoring-custom-events-attributes.mdx +++ b/src/content/docs/data-apis/custom-data/custom-events/report-mobile-monitoring-custom-events-attributes.mdx @@ -58,34 +58,28 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Create an event on iOS:** - ``` - BOOL purchaseRecorded = [NewRelic recordCustomEvent:@"UserAction" attributes:@{@"name": @"Purchase", @"sku": @"12345LPD", @"quantity": @1, @"unitPrice": @99.99, @"total": @99.99}]; + ```objectivec + BOOL purchaseRecorded = [NewRelic recordCustomEvent:@"UserAction" attributes:@{@"name": @"Purchase", @"sku": @"12345LPD", @"quantity": @1, @"unitPrice": @99.99, @"total": @99.99}]; ``` **Create an event on Android:** - ``` + ```java Map userActionAttributes = new HashMap(); - userActionAttributes.put("name", "Purchase"); - userActionAttributes.put("sku", "12345LPD"); - userActionAttributes.put("quantity", 1); - userActionAttributes.put("unitPrice", 99.99); - userActionAttributes.put("total", 99.99); - - boolean userActionRecorded = NewRelic.recordCustomEvent("UserAction", userActionAttributes); + boolean userActionRecorded = NewRelic.recordCustomEvent("UserAction", userActionAttributes); ``` New Relic reports a custom event of type `UserAction` and name `Purchase`, which allows you to query all purchases made in your app in the last day: - ``` - SELECT * from UserAction where name = 'Purchase' since 1 day ago + ```sql + SELECT * FROM UserAction WHERE name = 'Purchase' SINCE 1 day ago ``` @@ -96,14 +90,14 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan Look for queries used with `recordEvent` method, such as: - ``` - SELECT * from Mobile where category = 'Custom' and name = 'Purchase' since 1 day ago + ```sql + SELECT * FROM Mobile WHERE category = 'Custom' AND name = 'Purchase' SINCE 1 day ago ``` Replace them with the query format used with `recordCustomEvent`: - ``` - SELECT * from UserAction where name = 'Purchase' since 1 day ago + ```sql + SELECT * FROM UserAction WHERE name = 'Purchase' SINCE 1 day ago ``` @@ -117,7 +111,7 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Set the `userId` on iOS:** - ``` + ```objectivec BOOL userIdWasSet = [NewRelic setUserId:@"jsmith"]; ``` @@ -125,14 +119,14 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Set the `userId` on Android:** - ``` + ```java boolean userIdWasSet = NewRelic.setUserId("jsmith"); ``` With this attribute, you can use a [`WHERE`](/docs/insights/new-relic-insights/using-new-relic-query-language/nrql-reference#sel-where) clause to see all actions performed by that `username` in the last day: - ``` - SELECT * from Mobile WHERE userId = 'jsmith' since 1 day ago + ```sql + SELECT * FROM Mobile WHERE userId = 'jsmith' SINCE 1 day ago ``` @@ -146,7 +140,7 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Set the `storeId` on iOS:** - ``` + ```objectivec BOOL attributeSet = [NewRelic setAttribute:@"storeId" value:@"NY0531"]; ``` @@ -154,14 +148,14 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Set the `storeId` on Android:** - ``` - boolean attributeSet = NewRelic.setAttribute("storeId", "NY0531"); + ```java + boolean attributeSet = NewRelic.setAttribute("storeId", "NY0531"); ``` With this attribute, you can use a [`WHERE`](/docs/insights/new-relic-insights/using-new-relic-query-language/nrql-reference#sel-where) clause to see all actions performed by that `storeId` in the last day: - ``` - SELECT * from Mobile WHERE storeId = 'NY0531' since 1 day ago + ```sql + SELECT * FROM Mobile WHERE storeId = 'NY0531' SINCE 1 day ago ``` @@ -177,16 +171,16 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Create a counter on iOS:** - ``` - BOOL levelIncremented = [NewRelic incrementAttribute@"level"]; + ```objectivec + BOOL levelIncremented = [NewRelic incrementAttribute@"level"]; ``` **Create a counter on Android:** - ``` - boolean levelIncremented = NewRelic.incrementAttribute("level"); + ```java + boolean levelIncremented = NewRelic.incrementAttribute("level"); ``` Each subsequent call to `incrementAttribute` adds 1 to the attribute `level`: @@ -195,16 +189,16 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Increment a counter on iOS:** - ``` - levelIncremented = [NewRelic incrementAttribute@"level"]; + ```objectivec + levelIncremented = [NewRelic incrementAttribute@"level"]; ``` **Increment a counter on Android:** - ``` - levelIncremented = NewRelic.incrementAttribute("level"); + ```java + levelIncremented = NewRelic.incrementAttribute("level"); ``` @@ -217,22 +211,22 @@ Here are some examples of using [NRQL](/docs/query-data/nrql-new-relic-query-lan **Reset a counter on iOS:** - ``` - levelReset = [NewRelic setAttribute:@"level" value:@1]; + ```objectivec + levelReset = [NewRelic setAttribute:@"level" value:@1]; ``` **Reset a counter on Android:** - ``` - levelReset = NewRelic.setAttribute("level", 1); + ```java + levelReset = NewRelic.setAttribute("level", 1); ``` When querying, use this `level` attribute to filter your data. For example, if you have a `username` and `level` attribute, use the [`max()`](/docs/insights/new-relic-insights/using-new-relic-query-language/nrql-reference#func-max) function to find the highest level the user had reached: - ``` - SELECT max(level) from Mobile where username = 'jsmith' + ```sql + SELECT max(level) FROM Mobile WHERE username = 'jsmith' ```