# Notifications

> Configure Uptrace notification channels to receive alerts via Slack, PagerDuty, Microsoft Teams, Telegram, email, webhooks, and more. Control routing with Expr conditions.

Notification channels define where alerts are delivered and under what conditions. You can attach multiple channels to a single monitor and use condition expressions to route alerts selectively — for example, sending all alerts to a general channel but routing `URGENT` monitors to PagerDuty.

<video autoPlay="true" loop="true" muted="true" playsInline="true">
<source src="/features/alerting/alerting-notification-channels.mp4" type="video/mp4" />
</video>

## Channels

<br />

<alerting-channels-grid>



</alerting-channels-grid>

Create a channel via **Alerting → Channels → New channel**. Select the channel type, fill in the connection details, and optionally add a routing condition to filter which alerts it receives.

## Channel conditions

When creating a channel, you can specify a condition expression to filter which alerts it receives. Conditions are written in the [Expr](https://expr-lang.org/docs/language-definition) language.

In addition to Expr's built-in functions, Uptrace provides:

<table>
<thead>
  <tr>
    <th>
      Function
    </th>
    
    <th>
      Returns
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        monitorName() string
      </code>
    </td>
    
    <td>
      The monitor name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        alertName() string
      </code>
    </td>
    
    <td>
      The alert name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        alertType() string
      </code>
    </td>
    
    <td>
      <code>
        "error"
      </code>
      
       or <code>
        "metric"
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        attr(key string) string
      </code>
    </td>
    
    <td>
      The value of an alert attribute.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        hasAttr(key string) bool
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
      
       if the attribute exists on the alert.
    </td>
  </tr>
</tbody>
</table>

**Route only prod alerts to a Slack channel:**

```text
attr("deployment_environment") == "prod"
```

**Route only prod hosts to PagerDuty:**

```text
attr("host_name") startsWith "prod-"
```

**Route only URGENT monitors:**

```text
monitorName() contains "URGENT"
```

**Route all metric alerts to one channel, all error alerts to another:**

```text
alertType() == "metric"
```

## Notification frequency

On the first occurrence, Uptrace creates an alert and sends a notification immediately. For ongoing occurrences, Uptrace uses an adaptive interval that increases over time to reduce alert fatigue.

**Metric monitors** — interval starts at 15 minutes and doubles every 3 notifications. Maximum is 24 hours.

<table>
<thead>
  <tr>
    <th>
      Notifications sent
    </th>
    
    <th>
      Interval
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      1–3
    </td>
    
    <td>
      15 minutes
    </td>
  </tr>
  
  <tr>
    <td>
      4–6
    </td>
    
    <td>
      30 minutes
    </td>
  </tr>
  
  <tr>
    <td>
      7–9
    </td>
    
    <td>
      1 hour
    </td>
  </tr>
  
  <tr>
    <td>
      10–12
    </td>
    
    <td>
      2 hours
    </td>
  </tr>
  
  <tr>
    <td>
      ...
    </td>
    
    <td>
      doubles every 3
    </td>
  </tr>
  
  <tr>
    <td>
      max
    </td>
    
    <td>
      24 hours
    </td>
  </tr>
</tbody>
</table>

**Error monitors** — interval starts at 1 hour and doubles every 2 notifications. Maximum is 1 week.

<table>
<thead>
  <tr>
    <th>
      Notifications sent
    </th>
    
    <th>
      Interval
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      1–2
    </td>
    
    <td>
      1 hour
    </td>
  </tr>
  
  <tr>
    <td>
      3–4
    </td>
    
    <td>
      2 hours
    </td>
  </tr>
  
  <tr>
    <td>
      5–6
    </td>
    
    <td>
      4 hours
    </td>
  </tr>
  
  <tr>
    <td>
      7–8
    </td>
    
    <td>
      8 hours
    </td>
  </tr>
  
  <tr>
    <td>
      ...
    </td>
    
    <td>
      doubles every 2
    </td>
  </tr>
  
  <tr>
    <td>
      max
    </td>
    
    <td>
      1 week
    </td>
  </tr>
</tbody>
</table>

When an alert closes, Uptrace sends a recovery notification immediately. The total number of notifications is not limited — a metric monitor that never recovers will notify every 24 hours indefinitely.

## Email notifications

<alert type="info">

Relevant for the [self-hosted version](/get/hosted) only.

</alert>

To receive email notifications in Uptrace Community, users must have correct email addresses configured and the [mailer option](/get/hosted/config#email-configuration) must be enabled in the Uptrace config file.
