Alerts
Overview
The Alerts service allows you setup integrations so XPKit can send requests to your favourite communication tools such as Slack and Microsoft Teams. Once created your applications can send alerts via these channels.
The service manages two resources: distribution
and alert
. Distribution lists (distribution
) are where channels can be configured.
An alert
can be triggered by your application using a provided distribution
and any necessary context data.
When you work with other XPKit services (such as the health checks that trigger alerts on your behalf, you can select a
distribution
to define who and how they should be alerted.
Distibutions
The following channels are currently supported:
- Sentry
- Slack
- Teams
A distribution
is where API keys, credentials and configuration options for channels are provided.
By default XPKit provides two distribution lists that are designed to be used in health checks. You will find them in XPKit Portal, called App check in and App health. They contain sample HTML templates you can use if you wish to send email alerts.
Alerts
If your application needs to send an alert
, it should call the Alerts API selecting a distribution
and any context data to include in the alert such as an error_messsage. It is possible to provide channel specific context data, so for example send only a certain piece of information (or override the default) to Slack. See the examples section for more information.