Skip to main content
Apgar posts to Slack through an incoming webhook. Each agent can send to one Slack connection.

Set up

1

Create an incoming webhook

In Slack, create an app with an incoming webhook for the channel that should receive release messages, and copy the webhook URL. It starts with https://hooks.slack.com/.
2

Add the connection

In Settings, Connections, add a Slack connection with the webhook URL. Apgar stores the URL encrypted. Select Test to post a test message to the channel.
3

Choose it for the agent

In Add agent, or later in Agent settings, General, set Slack connection to the new connection. A connection that an agent uses cannot be deleted until the agent is changed or deleted.

Messages

Open states such as Collecting or Possible regression never send a message. A release that is replaced by a newer one sends no message of its own; the newer release sends New release. A channel usually sees one detection and one decision per release. A release that was Healthy and fails later sends a second decision, and so does a release that is evaluated again after a baseline change or an expected change. Each message has a bold title with the agent and the release, and a colored bar: red for a regression, green for healthy, amber for unconfirmed, and blue for a new release. A New release message names the baseline, or says that there is nothing to compare yet, and notes when the baseline was not itself confirmed healthy. A regression lists each failing metric as one sentence with its values, the allowed change, and where the change is concentrated, followed by the sample sizes. The attachment ends with a link to the release page at APGAR_PUBLIC_URL/agents/AGENT/releases/RELEASE.
The plain text fallback, which Slack shows in notifications and which is also the text field of a webhook body, carries the link only for New release and Regression.

Delivery

Messages are queued and sent by the worker. Slack must answer 200. A network error, a 429, or a 5xx response is retried after 1, 5, 15, and 60 minutes. After the fifth failed attempt the message is marked failed. Any other response fails at once. Settings, Notifications lists every delivery with its status and last error. Select Retry on a failed message to queue it again.
Set APGAR_PUBLIC_URL to the address people use to open Apgar, or the links in messages will point to localhost.