• Log inStart now

OpenTelemetry alerts: Best practices

Alerts is a tool you can use to notify yourself and others if your telemetry exceeds some particular thresholds. Thresholds are defined by conditions you create, and you can group those conditions into policies.

Depending on your role, you may use conditions to define the violations you and your team are notified about or you may be responding to those violations and want to know the condition that caused it.

Create alert conditions

Conditions use NRQL queries to define what you want to be notified about. Use the condition UI to set the specific thresholds that generate a violation and its notification. Writing a NRQL query from scratch might seem daunting, but if you create a condition from a New Relic chart, we'll populate the condition with the NRQL used to generate the chart. Then, you can modify the query if you want and then set the condition thresholds.

Here's how to try this:

  1. In the upper right corner of any chart, click the ellipses button, then click Create alert condition. Click on the image to enlarge it:

    • If the chart displays a single metric, use the slide-out window to create a new alert condition, with the NRQL query pre-populated.
    • If the chart displays multiple queries, you will be asked to choose which query you want to use.
  2. In the condition creation form, you can select an existing policy or create a new one.

For additional help creating alerts, see Introduction to alerts.

See your current alerts

If you are responsible for responding to violations, you may also want to know what alerts are set up for each of your services. You can quickly get a list of all the conditions and their related policies from the UI:

  1. From one.newrelic.com, click Explorer.
  2. In the left navigation pane, select Services - OpenTelemetry.
  3. Click the service name you want to investigate.
  4. In the left pane under Settings, click Alert conditions.

On the Alert conditions page, besides being able to see details about the alerts, you can also add a warning. You might do this to ensure you are notified if a threshold is approaching critical. In the Thresholds column, when you click on Create a warning, you are taken directly to the alert condition editor where you can add a warning threshold.

If you need an overview, see Create your first alert.

Copyright © 2022 New Relic Inc.