When something breaks in production, your monitoring tool usually knows first. An alert source gives it a URL to send alerts to. Each new alert becomes a bug task in the project, with the alert's details in it. Repeats of the same alert are folded into that task instead of creating new ones.
Adding and deleting alert sources is for organization admins and the project's owner.
Add an alert source
- Open the project, go to Settings and choose Alerts (under Operations).
- Click Add alert source.
- Fill in:
- Name: for example the tool and environment, such as Sentry (prod).
- Repository (optional): the repository the alerts are about, or Any repository (project default).
- Dedupe window (minutes): repeats of the same alert within this window are folded into the existing task. The default is one day (1440 minutes).
- Auto-run (guarded remediation) and Max auto-runs per hour: see below.
- Click Create.
- Copy the Ingest URL with Copy URL. It is shown only once; if you lose it, delete the source and create a new one.
Send alerts
Configure your monitoring tool to send a POST request with a JSON body to the ingest URL. CodeLynq reads these fields when they are present:
| Field | Used for |
|---|---|
title, message or error | The task title and the actual behaviour |
stack, stacktrace or stack_trace | The stack trace on the task |
severity, level, priority or labels.severity | The priority: critical/fatal become Critical, error/high High, warning Medium, info/low Low. Without a recognisable severity the task is Medium |
service or environment | Telling similar alerts apart |
fingerprint | Which alerts count as the same one |
The full alert is also added to the task description, so nothing is lost.
Without a fingerprint, CodeLynq derives one from the title, the service and the first line of the stack trace. Send your own fingerprint if your tool already groups alerts.
What you get
Each new alert creates a Bug task titled [alert] …, with the alert in its description and the stack trace and error in its bug report. From there it is a normal task: review it, approve the plan and start a run - see Tasks.
Auto-run: a guarded automatic fix
With Auto-run (guarded remediation) turned on, an alert can start a fix right away. It only does so when all of these hold:
- the alert is high or critical,
- the project has a verify command, so a fix that breaks the tests cannot pass - see Quality gates,
- this source has not reached its Max auto-runs per hour (0 turns auto-run off),
- your plan's limits and your spend limits allow the run without anyone approving it.
If any of these fails, the task is simply left for someone to pick up. An automatic fix always ends in a pull request for review. CodeLynq never merges it.
Manage sources
The list shows each source with its dedupe window and whether auto-run is on. Delete removes a source; its ingest URL stops working immediately.