Why an alert’s issue waits
An alert carries text from production traffic, such as an error message or a request path. Anyone can send a request that makes your app throw an error with a message they choose. That holds even when a service you trust sends the alert. So no automation builds an alert’s issue. A member reads the issue first and then chooses Build on the item’s page. See Why an issue from outside the team waits and Build an item that is not started. The text of an alert goes into the issue as plain text. A mention in it notifies no person or team in GitHub, Linear or Jira. A link, an image or a hidden comment in it shows as text.Add a webhook automation
You need the Edit factory settings permission. The factory needs a connected repository, Linear team or Jira project. See Connect a repository and Connect an issue tracker. For Sentry or PagerDuty, start at Set up Sentry or Set up PagerDuty. Each one says when to do these steps.- Open Settings, then Automations.
- Choose New automation, then choose Webhook.
- Enter a name.
- Under Sender, choose Sentry, PagerDuty or Any JSON. You cannot change the sender after you save.
- Under File the issue in, choose a repository, Linear team or Jira project.
- Check Issue title, Issue body and One open issue for each. Change them if you want.
- For Sentry or PagerDuty, paste the sender’s secret in Signing secret.
- Set the Daily limit: the most issues the automation files in 24 hours. The default is 5, and you can set 1 to 100.
- Choose Save.
The issue title, body and alert key
Put a field of the alert in double braces, such as{{ data.event.title }}. Put a dot between the names of nested fields. A field that the alert does not hold is empty.
When you choose Sentry or PagerDuty, the form fills in all three fields. You can change them. The title is cut to one line of 255 characters. OuterLayer adds a last line to the body that names the automation and the alert key.
One open issue for each holds the alert key: the alert field that names one alert. While an issue that the automation filed for a key is open, a new alert with the same key files nothing. When the issue closes, the next alert with that key files a new issue.
Set up Sentry
- In Sentry, create an internal integration.
- Copy the Client Secret of the integration.
- In OuterLayer, add the automation with the sender Sentry. Paste the Client Secret in Signing secret.
- Copy the automation’s URL.
- In Sentry, set the webhook URL of the integration to that URL.
- Turn on Alert Rule Action for the integration.
- Create an alert rule in Sentry. Add an action that sends a notification through your integration.
Sentry-Hook-Resource: event_alert and the action triggered. The automation ignores every other request from Sentry.
Set up PagerDuty
PagerDuty needs the automation’s URL before it shows a signing secret, and the automation needs a secret before it has a URL. So add the automation with a temporary secret, and replace it.- In OuterLayer, add the automation with the sender PagerDuty. Enter a long random text in Signing secret for now.
- Copy the automation’s URL.
- In PagerDuty, create a V3 webhook subscription with that URL.
- Choose the event
incident.triggered. - Copy the signing secret of the subscription.
- In OuterLayer, choose Edit on the automation. Paste the secret in Signing secret and choose Save.
- Send a test from PagerDuty. The run log shows “Received a test from PagerDuty”.
incident.triggered files an issue. The automation ignores every other event.
When the run log shows Refused for PagerDuty, fix the cause before PagerDuty sends two more requests. A wrong signing secret is the usual cause. If PagerDuty turned the subscription off, turn it on again in PagerDuty.
Set up any other service
Choose Any JSON for a service that signs in the Standard Webhooks format. OuterLayer makes the signing secret when you save the automation. The secret starts withwhsec_. The page that opens after the save shows it once. Copy it then, and give it to the service with the URL.
The service must sign each request this way:
- It sends the headers
webhook-id,webhook-timestampandwebhook-signature. The namessvix-id,svix-timestampandsvix-signaturealso work. - It signs the text
<id>.<timestamp>.<body>with HMAC-SHA256. The key is the base64-decoded bytes afterwhsec_. - The signature header holds
v1,and the base64 digest. It can hold several signatures with spaces between them.
Replace a signing secret
You can replace the secret of a Sentry or PagerDuty automation.- Open the automation and choose Edit.
- Paste the new secret in Signing secret. An empty field keeps the stored secret.
- Choose Save.
When an alert files no issue
A request files nothing in these cases. The run log names the reason for most of them.- The signature is not valid, or the request is not JSON. A request can hold at most 256 KB.
- The sender sent the same delivery again. One delivery files at most one issue, and the copy writes no row.
- An issue for the same alert key is still open.
- The automation reached its daily limit of issues in the last 24 hours.
- The automation is off. It writes no row.
- The tracker refused the issue. The run log shows the tracker’s answer.
Read the run log
Open Settings, then Automations, then choose the automation. Its page shows the run log, newest first. Each row has the time, the alert key, the result and the reason. OuterLayer keeps each row for 90 days.
A request that the automation ignores writes no row. A request to an automation that is off writes none. OuterLayer logs at most 20 Refused rows for each automation in one hour.
Change, switch off or delete an automation
You need the Edit factory settings permission. Without it, you can read the automation and its run log.- Choose the automation to open its page.
- Use the switch to turn the automation on or off.
- To change the automation, choose Edit.
- To delete the automation and its run log, choose Delete and confirm.