Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daily merge 01 16 evening #19730

Merged
merged 20 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3ae83aa
docs: Add AI Monitoring Disclaimer
RyanKadri Jan 9, 2025
301320d
chore: add syntax highlighting to nrql
brnhensley Jan 10, 2025
c76e82b
fix: typo - NOT_LIKE -> NOT LIKE
brnhensley Jan 10, 2025
6fdc6ea
chore: format code blocks
brnhensley Jan 10, 2025
95acb5a
chore: format codeblocks
brnhensley Jan 10, 2025
7acce18
docs: Add API examples for cross-account alert elections
founddrama Jan 13, 2025
b73ef1c
chore: capitalize nrql
brnhensley Jan 13, 2025
2110e7a
Update nerdgraph-api-cross-account-alerting-elections.mdx
mlakshmiharita Jan 16, 2025
3c140a1
Update nerdgraph-api-cross-account-alerting-elections.mdx
mlakshmiharita Jan 16, 2025
1a9c562
chore(whats-new-ids): updated ids
svc-docs-eng-opensource-bot Jan 16, 2025
310eee6
Update nerdgraph-api-cross-account-alerting-elections.mdx
mlakshmiharita Jan 16, 2025
052172f
Merge pull request #19727 from newrelic/whats-new-id-1a9c562a
cbehera-newrelic Jan 16, 2025
a971168
Minor enhancements
cbehera-newrelic Jan 16, 2025
3fe486a
fixed frontmatter
cbehera-newrelic Jan 16, 2025
b277c48
Merge pull request #19693 from brnhensley/patch-7
cbehera-newrelic Jan 16, 2025
c206c9b
Merge pull request #19705 from founddrama/docs/cross-account-alerting…
cbehera-newrelic Jan 16, 2025
f1bcb0d
Reverting the whats new and EOL
mlakshmiharita Jan 16, 2025
56fe21e
minor enhancement
cbehera-newrelic Jan 16, 2025
f37f93c
Merge pull request #19653 from RyanKadri/feat/ai-monitoring-disclaimers
cbehera-newrelic Jan 16, 2025
f6d4a66
Merge pull request #19729 from newrelic/revert-whatsnew-eol-for-rest-…
adutta-newrelic Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "NerdGraph tutorial: Elections for cross-account alerting"
tags:
- Alerts
- Alerts and NerdGraph
metaDescription: 'Examples of how to use the NerdGraph API explorer to update account elections for cross-account alerting.'
freshnessValidatedDate: never
---

To allow data sharing between accounts within an organization, an account must opt in to the 'cross-account alerting' feature. Follow these instructions on how to use the NerdGraph API Explorer to update account settings by enabling cross-account alerting.

<Callout variant="important">
Only users with the "Data-sharing access control" permission can update cross-account elections for data sharing. By default, this permission is granted only to users with the "Organization Manager" role.
</Callout>

## Steps to update a cross-account alerting election

<Steps>

<Step>
Collect the list of account IDs to update. The API accepts up to **20 account IDs**.
</Step>

<Step>
Indicate whether you want to enable `true` or disable `false` the election.
</Step>

<Step>
Use the NerdGraph API explorer to update the account elections.
</Step>

</Steps>

Here's an example of the mutation:

```graphql
mutation {
alertsUpdateCrossAccountElections(
accountIds: [YOUR_1ST_ACCOUNT_ID, YOUR_2ND_ACCOUNT_ID, YOUR_3RD_ACCOUNT_ID],
electionStatus: true
) {
electionStatus
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,11 @@ This section includes Go agent configurations for setting up AI monitoring.
If distributed tracing is disabled or high security mode is enabled, AI monitoring will not collect AI data.
</Callout>

<Callout variant="important">
When enabled, AI monitoring records a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein.
You're responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI monitoring feature.
</Callout>

<CollapserGroup>
<Collapser
id="ai-monitoring-enabled"
Expand Down Expand Up @@ -3834,7 +3839,7 @@ Next initialize and enable the security agent.
nrsecurityagent.ConfigSecurityValidatorServiceEndPointUrl("wss://csec.nr-data.net"),
nrsecurityagent.ConfigSecurityEnable(true),
)
```
```


````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,11 @@ This section details the Java agent configuration options for [AI monitoring](/d
If distributed tracing is disabled or high security mode is enabled, AI monitoring will not collect AI data.
</Callout>

<Callout variant="important">
When enabled, AI monitoring records a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein.
You're responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI monitoring feature.
</Callout>

<CollapserGroup>
<Collapser
id="ai-monitoring-enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags:
- Configuration
metaDescription: 'How to configure the New Relic .NET agent using newrelic.config, including startup and instrumentation options, and disabling unwanted features.'
redirects:
- /docs/agents/net-agent/configuration/net-agent-configuration
- /docs/agents/net-agent/configuration/net-agent-configuration
- /docs/general/dotnet-agent-configuration
- /docs/dotnet/dotnet-agent-configuration
- /docs/agents/net-agent/installation/install/dotnet-agent
Expand Down Expand Up @@ -3704,6 +3704,10 @@ NEW_RELIC_CODE_LEVEL_METRICS_ENABLED=true

By default, AI monitoring is disabled. To enable AI monitoring, set the `enabled` attribute to `true` in the `aiMonitoring` element. The `aiMonitoring` element is a child of the `configuration` element.

<Callout variant="important">
When enabled, AI Monitoring will record a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein. When using AI Monitoring, you are responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI Monitoring feature.
</Callout>

```xml
<aiMonitoring enabled="true" />
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,10 @@ This section includes Node.js agent configurations for setting up AI monitoring.
You must enable [distributed tracing](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#dt-main) to capture AI data. It's turned on by default in Node.js agents 8.3.0 and higher. If you've enabled high security mode, AI monitoring will not work.
</Callout>

<Callout variant="important">
When enabled, AI Monitoring will record a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein. When using AI Monitoring, you are responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI Monitoring feature.
</Callout>

<CollapserGroup>
<Collapser
id="ai-monitoring-enabled"
Expand Down Expand Up @@ -1426,7 +1430,7 @@ This section defines the variables for [Node.js agent attributes](/docs/agents/n
Prefix of attributes to exclude from all destinations. Allows `*` as wildcard at end. For example, in the config file, this would include all parameters except `somethingSecret`:

```js
attributes: {
attributes: {
include: [ 'request.parameters.*' ],
exclude: [ 'request.parameters.somethingSecret' ]
}
Expand Down Expand Up @@ -1471,28 +1475,28 @@ This section defines the variables for [Node.js agent attributes](/docs/agents/n
</tbody>
</table>

Prefix of attributes to include from all destinations. Allows `*` as wildcard at end.
Prefix of attributes to include from all destinations. Allows `*` as wildcard at end.

For example, in the `config` file, this would include all parameters:

```js
attributes: {
attributes: {
include: [ 'request.parameters.*' ]
}
```

Using this example Express route definition and request URL:

```js
app.get('/api/users/:id', myMiddleware, myController)
```

```sh
curl http://localhost:3000/api/users/abc123?id=true
```

The _route parameter_ is `id`, and has a value of `abc123`. This becomes the attribute `request.parameters.route.id: abc123` on the Transaction, root Segment, and Span. This example also has a _query parameter_ of `id`, which has a value of `true`. This would become the attribute `request.parameters.id: true` on the Transaction, root Segment, and Span.

</Collapser>

<Collapser
Expand Down Expand Up @@ -2859,7 +2863,7 @@ This section defines the Node.js agent variables in the order they typically app
</tbody>
</table>

Prefix of attributes to exclude from transaction events. Allows `*` as wildcard at end.
Prefix of attributes to exclude from transaction events. Allows `*` as wildcard at end.
</Collapser>

<Collapser
Expand Down Expand Up @@ -2900,7 +2904,7 @@ This section defines the Node.js agent variables in the order they typically app
</tbody>
</table>

Prefix of attributes to include in transaction events. Allows `*` as wildcard at end.
Prefix of attributes to include in transaction events. Allows `*` as wildcard at end.
</Collapser>
</CollapserGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Here are detailed descriptions of each configuration method:
Starting with Python 3.11 the newer `.toml` syntax for configuration was added to the [standard library](https://docs.python.org/3/library/tomllib.html). Agent version `10.3.0` added support for using this newer format.
</Callout>
The configuration file uses Tom's Obvious Minimal Language `.toml` files. For more information, see the [official file format documentation](https://toml.io/en/).

To use the `.toml` syntax, the configuration file's name must end with `.toml` to indicate the syntax type. The standard `pyproject.toml` may be used alongside configuration for other libraries, or you may use a more specific file like `newrelic.toml`.

The basic structure should look like the following:

```ini
Expand Down Expand Up @@ -1448,6 +1448,11 @@ This section includes Python agent configurations for setting up AI monitoring.
You must enable [distributed tracing](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#dt-main) to capture AI data. It's turned on by default in Python agent versions 7.0.0.166 and higher.
</Callout>

<Callout variant="important">
When enabled, AI monitoring records a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein.
You're responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI monitoring feature.
</Callout>

<CollapserGroup>
<Collapser
id="ai-monitoring-enabled"
Expand Down Expand Up @@ -4379,7 +4384,7 @@ For some tips on configuring logs for the Python agent, see [Configure Python lo
</tr>
</tbody>
</table>

A case-insensitive list of label names to exclude when you enable including labels in logs. This attribute does not support wildcards or regex.
<Callout variant="important">When adding labels as attributes, the agent prefixes the keys with `tags.`. This prefix is <b>NOT</b> included when matching against the exclude filtering rules.</Callout>
</Collapser>
Expand Down Expand Up @@ -5849,4 +5854,4 @@ To disable default instrumentation, provide a special `import-hook` section corr
enabled = false
```
</Collapser>
</CollapserGroup>
</CollapserGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ You can also create your own query. To do that:
id="compare-one"
title="Query: Compare the last 15 minutes to the same time 1 day ago"
>
Please note that the UNTIL NOW portion is required here unlike in standard NRQL. Without the UNTIL NOW added, the system will query a 5 minute slice of data starting 15 minutes ago
Note that the `UNTIL NOW` portion is required here unlike in standard NRQL. Without the `UNTIL NOW` added, the system will query a 5 minute slice of data starting 15 minutes ago.

```
```sql
SINCE 15 minutes AGO UNTIL NOW COMPARE WITH 1 day ago
```
</Collapser>
Expand All @@ -166,13 +166,13 @@ You can also create your own query. To do that:
id="compare-one"
title="Query: Compare a specific time range to the same range a month ago"
>
```
```sql
SINCE '2021-03-07 07:00:00-0500' UNTIL '2021-03-08 07:00:00-0500' COMPARE WITH 1 month ago
```

Or:

```
```sql
SINCE 'today at midnight' UNTIL 'now' COMPARE WITH 1 MONTH AGO
```
</Collapser>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Some tips for using the filter bar:

* Type in a <DNT>**string**</DNT> of characters and/or numbers (for example, an environment) to find any entity that has this string in their name or ID. When typing, the UI suggests items that coincide with the string you're entering, so you can select one of those from the dropdown. You can also filter by the name of the <DNT>**entity**</DNT>, the <DNT>**entity type**</DNT>, <DNT>**account ID**</DNT>, <DNT>**environment**</DNT>, or a [<DNT>**tag**</DNT>](/docs/new-relic-one/use-new-relic-one/core-concepts/tagging-use-tags-organize-group-what-you-monitor). Selection parameters, once created, have a blue background.
* If you filter using a string, the filter will have the `=` operator.
* If you filter using the dropdown menu, once the first element of the searched item (tag key or attribute) is entered, you need to select an operator (`=`, `!=`, `LIKE`, `NOT_LIKE`, `IN`, `NOT IN`) for your filter.
* If you filter using the dropdown menu, once the first element of the searched item (tag key or attribute) is entered, you need to select an operator (`=`, `!=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`) for your filter.
* Once the operator is selected, complete the filter by selecting the value to complete the search item.

To add more filters, first you have to select an operator, `AND` or `OR.` Tips on using these:
To add more filters, first you have to select an operator, `AND` or `OR`. Tips on using these:

* Use `AND` to indicate you want to restrict the selection removing entities from the list of results. You can also use the AND operator to add conditions that need to be met in the list of results, for example, <DNT>**entityType = Services `AND` location = APAC**</DNT>.
* Use `AND` to indicate you want to restrict the selection removing entities from the list of results. You can also use the `AND` operator to add conditions that need to be met in the list of results, for example, <DNT>**entityType = Services `AND` location = APAC**</DNT>.
* Note that <DNT>**entityType = Services `AND` entityType = Hosts**</DNT> doesn’t return any results, as entities can only have one type and no entity would match this condition.
* Use `OR` to add more entities to the selection. For example, the filter <DNT>**entityType = Services `OR` entityType = Hosts**</DNT> returns every entity you have access to that is of type `Services` or `Hosts`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ If you want to turn off infrastructure tag propagation, which means that you won

```sql
SELECT rate(count(apm.service.transaction.duration), 1 minute)
FROM Metric WHERE appName LIKE 'MyApp (%' AND transactionType = 'Other'
FACET tags.Environment TIMESERIES
FROM Metric WHERE appName LIKE 'MyApp (%' AND transactionType = 'Other'
FACET tags.Environment TIMESERIES
```
</Collapser>

Expand All @@ -356,8 +356,8 @@ If you want to turn off infrastructure tag propagation, which means that you won

```sql
FROM Transaction SELECT count(*)
WHERE tags.Team = 'team-a'
FACET tags.Project TIMESERIES
WHERE tags.Team = 'team-a'
FACET tags.Project TIMESERIES
```
</Collapser>

Expand All @@ -369,14 +369,14 @@ If you want to turn off infrastructure tag propagation, which means that you won

```sql
FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration)
WHERE tags.Team = 'team-b' FACET appName
WHERE tags.Team = 'team-b' FACET appName
```

Related to this, you might create a general rule for a specific service deployed across several environments, so that we have an alarm for a single service monitoring each environment individually:

```sql
From Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration)
WHERE tags.Project = 'MyProject' FACET tags.Environment
FROM Metric SELECT count(apm.service.error.count) / count(apm.service.transaction.duration)
WHERE tags.Project = 'MyProject' FACET tags.Environment
```
</Collapser>

Expand All @@ -402,7 +402,14 @@ If you want to turn off infrastructure tag propagation, which means that you won
Here's the NRQL query to select `cpuPercent`, broken down by the different experimental groups using a `FACET CASES (...)` clause:

```sql
FROM SystemSample SELECT cpuPercent FACET CASES (WHERE tags.experimentGroup = 'control' AS 'control group', WHERE tags.experimentGroup = 'A' AS 'given treatment A', WHERE tags.experimentGroup = 'B' AS 'given treatment B') SINCE 1 DAY AGO
FROM SystemSample SELECT cpuPercent
FACET CASES
(
WHERE tags.experimentGroup = 'control' AS 'control group',
WHERE tags.experimentGroup = 'A' AS 'given treatment A',
WHERE tags.experimentGroup = 'B' AS 'given treatment B'
)
SINCE 1 DAY AGO
```
</Collapser>

Expand All @@ -414,13 +421,19 @@ If you want to turn off infrastructure tag propagation, which means that you won

```graphql
mutation {
dataManagementUpdateFeatureSettings(accountId: YOUR_ACCOUNT_ID, setting: {enabled: false, featureSetting: {key: "infra_tag_propagation"}, locked: false})
{
enabled
key
locked
name
dataManagementUpdateFeatureSettings(
accountId: YOUR_ACCOUNT_ID
setting: {
enabled: false
featureSetting: { key: "infra_tag_propagation" }
locked: false
}
) {
enabled
key
locked
name
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ To set up the alert condition:
2. Where prompted to <DNT>**Select a product**</DNT>, click <DNT>**NRQL**</DNT>.
3. Add the following NRQL query:

```
SELECT latest(statusValueCode) FROM WorkloadStatus WHERE workloadGuid = 'YOUR_WORKLOAD_GUID' FACET workloadGuid as 'entity.guid', entity.name
```sql
SELECT latest(statusValueCode) FROM WorkloadStatus
WHERE workloadGuid = 'YOUR_WORKLOAD_GUID'
FACET workloadGuid AS 'entity.guid', entity.name
```
4. Some tips for writing your query:
* Get the workload GUID by clicking on the <DNT>**See metadata and manage tags**</DNT> in the workloads UI.
Expand All @@ -68,7 +70,7 @@ To set up the alert condition:
* Choose to fill data gaps with <DNT>**last known value**</DNT>.
7. Optionally, you can also add a custom incident description that includes the workload name and permanent link to the UI in the alert notification:

```
```handlebars
Workload: {{tag.entity.name}}
Direct link: https://one.newrelic.com/redirect/entity/{{tag.entity.guid}}
```
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Here are the rules that NRQL follows:
NRQL uses single quotes to designate strings. For example:

```sql
... where traceId = '030a573f0df02c57'
... WHERE traceId = '030a573f0df02c57'
```
</td>
</tr>
Expand Down
Loading
Loading