Skip to content

Commit

Permalink
Merge branch 'develop' into nb-alerts-create-conditions1
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaenam committed Oct 30, 2024
2 parents 1ac0680 + 1db19bb commit ba12821
Show file tree
Hide file tree
Showing 79 changed files with 1,151 additions and 862 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@emotion/styled": "^11.3.0",
"@mdx-js/mdx": "2.0.0-next.8",
"@mdx-js/react": "2.0.0-next.8",
"@newrelic/gatsby-theme-newrelic": "9.10.5",
"@newrelic/gatsby-theme-newrelic": "9.10.6",
"@splitsoftware/splitio-react": "^1.2.4",
"ansi-colors": "^4.1.3",
"cockatiel": "^3.0.0-beta.0",
Expand Down
8 changes: 4 additions & 4 deletions src/content/docs/alerts/admin/rules-limits-alerts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Limits and rules pertaining to New Relic <InlinePopover type="alerts"/>:

<tr>
<td>
[Targets (product entities)](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/select-product-targets-alert-condition) per condition
[Targets (product entities)](/docs/new-relic-solutions/get-started/glossary/#alert-target) per condition
</td>

<td>
Expand Down Expand Up @@ -192,7 +192,7 @@ Limits and rules pertaining to New Relic <InlinePopover type="alerts"/>:

<tr>
<td>
[Custom incident descriptions](/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/alert-custom-incident-descriptions)
[Custom incident descriptions](/docs/alerts/create-alert/condition-details/alert-custom-incident-descriptions)
</td>

n/a
Expand Down Expand Up @@ -309,11 +309,11 @@ Limits and rules pertaining to New Relic <InlinePopover type="alerts"/>:
</td>

<td>
[Depends on channel](/docs/alerts/new-relic-alerts-beta/managing-notification-channels/notification-channels-controlling-where-send-alerts#channel-types)
[Depends on channel](/docs/alerts/get-notified/intro-notifications/#channels)
</td>

<td>
[Depends on channel](/docs/alerts/new-relic-alerts-beta/managing-notification-channels/notification-channels-controlling-where-send-alerts#channel-types)
[Depends on channel](/docs/alerts/get-notified/intro-notifications/#channels)
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To alert on custom metrics, follow standard procedures to [add a condition](/doc

Use the policy's <DNT>**Thresholds**</DNT> section to define the custom metric values. These include:

* The custom metric name for the selected product category and [targets](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/select-product-targets-alert-condition).
* The custom metric name for the selected product category and [targets](/docs/new-relic-solutions/get-started/glossary/#alert-target).
* Selected threshold value function of either average, minimum, maximum, total value per minute, or throughput.
* Selected threshold level of either above, below, or equal to.
* Critical and warning threshold value and duration that will open an incident, such as `5 units for at least 5 minutes`.
Expand All @@ -46,7 +46,7 @@ To define the custom metric values for your condition:
2. Click on the policy you'd like to create the classic alert condition, or create a new policy.
3. Select <DNT>**+ New alert condition**</DNT>, then select <DNT>**Build a classic alert**</DNT>.
4. From the <DNT>**Categorize**</DNT> section, select the [product and type of condition](/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-alert-conditions) for the custom metric.
5. From the <DNT>**Select entities**</DNT> section, add one or more [targets (entities)](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/select-product-targets-alert-condition) that use your custom metric.
5. From the <DNT>**Select entities**</DNT> section, add one or more [targets (entities)](/docs/new-relic-solutions/get-started/glossary/#alert-target) that use your custom metric.
6. From the <DNT>**Set thresholds**</DNT> section, select one of the metrics from the <DNT>**Custom Metrics**</DNT> section in the Select drop down.
7. Provide the [required threshold values](#custom-metrics-requirements) for your custom metric.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metaDescription: "Notifications are how you integrate your New Relic data with t
freshnessValidatedDate: never
redirects:
- /docs/alerts-applied-intelligence/notifications/intro-notifications
- /docs/alerts/new-relic-alerts-beta/managing-notification-channels/notification-channels-controlling-where-send-alerts
---

DevOps teams have a lot to monitor as systems grow increasingly complex and it can be hard to keep track of what is going on, where. Notifications is a suite of tools that enable you to get the right information to the right people as soon as possible. Notifications send notification events to third-party services, such as Slack, Jira, ServiceNow, and email. You can also use webhooks to send your data to any compatible third-party service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ All attributes are available for use in a [description](/docs/alerts/new-relic-a
<td>
The contents of the active condition's `Violation Description` field.

NRQL or infrastructure conditions only.
NRQL or infrastructure conditions only. Not available for use with alert condition [title](docs/alerts/create-alert/condition-details/title-template) or [description templates](/docs/alerts/create-alert/condition-details/alert-custom-incident-descriptions).
</td>
</tr>

Expand Down Expand Up @@ -257,7 +257,7 @@ All attributes are available for use in a [description](/docs/alerts/new-relic-a
</td>

<td>
The unique identifier of the incident.
The unique identifier of the incident. Not available for use with alert condition [title](docs/alerts/create-alert/condition-details/title-template) or [description templates](/docs/alerts/create-alert/condition-details/alert-custom-incident-descriptions).
</td>
</tr>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Scala instrumentation
title: "Scala instrumentation"
tags:
- Agents
- Java agent
- Custom instrumentation
metaDescription: Supplemental directions for instrumenting the New Relic Java agent with Scala applications.
metaDescription: "Supplemental directions for instrumenting the New Relic Java agent with Scala applications."
redirects:
- /docs/agents/java-agent/frameworks/scala-installation-java
- /docs/java/scala-general-help
Expand Down Expand Up @@ -223,6 +223,48 @@ implicit val ec: ExecutionContext = ???
x.foreach(println) // prints 3 on completion of Future
```

### Futures

New Relic handles Scala futures when they're submitted to the executor, which might lead to a different outcome than you expect. The examples in this section clarifies how this works, so you know what to expect.

This example is calling a transaction block, which takes a future as its parameter and chains it to a second future:

```scala
def chainFutures(f: Future[Unit]) = txn {
f.flatMap( _ => Future{ Thread.sleep(2000) })
}

val f = Future { Thread.sleep(5000) } // future is submitted here
chainFutures(f)
```

From this example, you might expect `chainFutures` to produce a transaction lasting 7 seconds. Instead, the New Relic UI shows the transaction finishing immediately.

The future `f` in the example is submitted by the `Future.apply()` method when it's constructed, before the transaction exists. Because `f` is submitted outside the transaction, any threadhops made during its execution aren't linked together. The downstream future, `Future{ Thread.sleep(2000) }`, is also untracked, because it's submitted in a callback after the transaction context is already gone.

There are a few things you can do to get your transaction to capture the timing of both futures.

* Although you might not be able to change when `f` is submitted, you can time it using the `asyncTrace` method. This times `f` from the moment the transaction is started (but will not track threadhops made by `f`).
* You can use a token to link the callback to the transaction in order to preserve the transaction context during threadhops.
* You can add another `asyncTrace` to time the second future.

With this example, the New Relic UI shows a transaction lasting about 7 seconds, with two segments named “first future” and “second future”:


```scala
def chainFutures(f: Future[Unit]) = txn {
val t = NewRelic.getAgent.getTransaction.getToken
asyncTrace("future one" )(f) //asyncTrace times the first future
.flatMap(_ => {
t.linkAndExpire() //token links across potential threadhops
asyncTrace("future two"){ Future { Thread.sleep(2000) } } //asyncTrace times the second future
})
}
val f = Future { Thread.sleep(5000) }
chainFutures(f)
```


## Instrument Scala with the Java agent API [#using-the-java-api]

Instrument Scala to use the New Relic API class or [annotations](/docs/agents/java-agent/java-agent-api/java-agent-api-instrument-using-annotation).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co
The .NET agent does not directly monitor datastore processes. Also, the .NET SQL parameter capture in a query trace does not list parameters for a parameterized query or a stored procedure.

Collecting [instance details](/docs/apm/applications-menu/features/analyze-database-instance-level-performance-issues) for supported datastores is enabled by default. To request instance-level information from datastores not currently listed, get support at [support.newrelic.com](https://support.newrelic.com).

If your datastore isn't listed here, you can add custom instrumentation using the `RecordDatastoreSegment` method in the [.NET agent API](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#ITransaction).
</Collapser>

<Collapser
Expand Down Expand Up @@ -1553,6 +1555,8 @@ Want to try out our .NET agent? [Create a New Relic account](https://newrelic.co

</tbody>
</table>

If your datastore isn't listed here, you can add custom instrumentation using the `RecordDatastoreSegment` method in the [.NET agent API](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#ITransaction).
</Collapser>

<Collapser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ The following list contains the different calls you can make with the API, inclu

<CollapserGroup>
<Collapser
id="with-aspx"
id=""
title="With ASPX"
>
```aspnet
Expand All @@ -312,7 +312,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="with-razor"
id=""
title="With Razor"
>
```cshtml
Expand All @@ -339,7 +339,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="with-blazor"
id=""
title="With Blazor"
>
<Callout variant="important">
Expand Down Expand Up @@ -595,7 +595,7 @@ The following list contains the different calls you can make with the API, inclu

<CollapserGroup>
<Collapser
id="AcceptDistributedTraceHeaders"
id=""
title="AcceptDistributedTraceHeaders"
>
### Syntax
Expand Down Expand Up @@ -685,7 +685,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="InsertDistributedTraceHeaders"
id=""
title="InsertDistributedTraceHeaders"
>
### Syntax
Expand Down Expand Up @@ -758,7 +758,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="AcceptDistributedTracePayload"
id=""
title="AcceptDistributedTracePayload (obsolete)"
>
<Callout variant="caution">
Expand Down Expand Up @@ -839,7 +839,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="CreateDistributedTracePayload"
id=""
title="CreateDistributedTracePayload (obsolete)"
>
<Callout variant="caution">
Expand Down Expand Up @@ -873,7 +873,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="AddCustomAttribute"
id=""
title="AddCustomAttribute"
>
### Syntax
Expand Down Expand Up @@ -1046,7 +1046,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="CurrentSpan"
id=""
title="CurrentSpan"
>
Provides access to the currently executing [span](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#ISpan), making span-specific methods available within the New Relic API.
Expand All @@ -1061,7 +1061,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="SetUserId"
id=""
title="SetUserId"
>
### Syntax
Expand Down Expand Up @@ -1115,7 +1115,7 @@ The following list contains the different calls you can make with the API, inclu
```
</Collapser>
<Collapser
id="RecordDatastoreSegment"
id=""
title="RecordDatastoreSegment"
>
### Syntax
Expand Down Expand Up @@ -1302,7 +1302,7 @@ The following list contains the different calls you can make with the API, inclu

<CollapserGroup>
<Collapser
id="ISpanAddCustomAttribute"
id=""
title="AddCustomAttribute"
>
Adds contextual information about your application to the current span in the form of [attributes](/docs/using-new-relic/welcome-new-relic/get-started/glossary#attribute).
Expand Down Expand Up @@ -1477,7 +1477,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="setname"
id=""
title="SetName"
>
Changes the name of the current segment/span that will be reported to New Relic. For segments/spans resulting from custom instrumentation, the metric name reported to New Relic will be altered as well.
Expand Down Expand Up @@ -1697,7 +1697,7 @@ The following list contains the different calls you can make with the API, inclu

<CollapserGroup>
<Collapser
id="exception-overload"
id=""
title="NoticeError(Exception)"
>
```cs
Expand Down Expand Up @@ -1734,7 +1734,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="exception-idictionary-overload"
id=""
title="NoticeError(Exception, IDictionary)"
>
```cs
Expand Down Expand Up @@ -1783,7 +1783,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="NoticeError(String, IDictionary)"
id=""
title="string-idictionary-overload"
>
```cs
Expand Down Expand Up @@ -1833,7 +1833,7 @@ The following list contains the different calls you can make with the API, inclu
</Collapser>

<Collapser
id="string-idictionary-bool-overload"
id=""
title="NoticeError(String, IDictionary, bool)"
>
```cs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Want to learn more before you get started? [Introduction to APM](/docs/apm/new-r
## What do you want to monitor? [#what]

<Callout variant="tip">
Is your application running on a Kubernetes cluster? Try out our installation method using the [Kubernetes agents operator](/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator/).
Is your application running on a Kubernetes cluster? Try out our installation method using the [Kubernetes APM auto-attach](/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator/).
</Callout>

We have a few paths to install the Node.js agent, depending on what you're monitoring.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5372,7 +5372,7 @@ Here are assorted other settings available via the agent configuration file.
</tbody>
</table>

If this setting is enabled, the agent will send detailed troubleshooting messages from its startup scripts directly to your console (STDOUT). This can be helpful for debugging crashes in the `newrelic-admin` startup script, the alternative `bootstrap/sitecustomize.py` startup script, or the startup sequence of the Kubernetes Agents Operator.
If this setting is enabled, the agent will send detailed troubleshooting messages from its startup scripts directly to your console (STDOUT). This can be helpful for debugging crashes in the `newrelic-admin` startup script, the alternative `bootstrap/sitecustomize.py` startup script, or the startup sequence of the Kubernetes APM auto-attach.

<Callout variant="caution">
This environment variable setting has no corresponding config file setting, as the code related to it runs before the config file is read. For comprehensive debug logging after the agent has started, set [log level](#log_level) to `debug`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Our Ruby agent auto-instruments your code so you can start monitoring applicatio
</ButtonLink>

<Callout variant="tip">
Is your application running on a Kubernetes cluster? Try out our installation method using the [Kubernetes agents operator](/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator/).
Is your application running on a Kubernetes cluster? Try out our installation method using the [Kubernetes APM auto-attach](/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator/).
</Callout>

## Install the gem [#Installing_the_Gem]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ To see in-editor performance data, your service must meet the requirements liste
* <DNT>**Node.js:**</DNT> Requires Node.js agent version 10.5.0 or higher. If your codebase include anonymous functions you'll need to either use [change tracking](/docs/change-tracking/change-tracking-introduction/) to send deployment information to New Relic, or you'll need to [send your build SHA via an environment variable](/docs/codestream/observability/error-investigation/#buildsha) in your build pipeline.
* <DNT>**PHP:**</DNT> Requires PHP agent version 10.6.0 or higher. If you're using VS Code, you must also have the [PHP Intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client) extension installed.
* <DNT>**Python:**</DNT> Requires Python agent version 7.10.0.175 or higher. Code-level metrics are only available for projects implemented with a [supported Python framework](/docs/apm/agents/python-agent/getting-started/instrumented-python-packages) and for PHP version 7.0 or higher. If you're using VS Code, you must also have the [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) extension installed with the language server enabled.
* <DNT>**Ruby:**</DNT> Requires Ruby agent version 8.10.0 or higher. Code-level metrics are only available for Rails applications and Ruby methods with manual traces ([learn more about Ruby methods and CodeStream](/docs/apm/agents/ruby-agent/features/ruby-codestream-integration)). If you're using VS Code, you must also have either the [Ruby](https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby) or [Ruby Solargraph](https://marketplace.visualstudio.com/items?itemName=castwide.solargraph) extension installed with the language server enabled.
* <DNT>**Ruby:**</DNT> Requires Ruby agent version 8.10.0 or higher. Code-level metrics are only available for Rails applications and Ruby methods with manual traces ([learn more about Ruby methods and CodeStream](/docs/apm/agents/ruby-agent/features/ruby-codestream-integration)). If you're using VS Code, you must also have the [Ruby LSP](https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-lsp) extension installed.

You can turn CodeLenses off by going to the CodeStream section of your IDE's settings and unchecking the <DNT>**CodeStream: Show Golden Signals In Editor**</DNT> setting.
Loading

0 comments on commit ba12821

Please sign in to comment.