Parameterization in Issue Templates for Incidents
Problem to solve
Alerts contain a lot of information that typically varies based on the service and the problem at hand. In GitLab today, we provide a simple setting that users can enable to automatically create issues when a prometheus Alert is triggered. We can save users time and automate some of the routing and triage process for issues by allowing users to assign and label issues or select specific runbooks based on alert attributes.
We can achieve this by parameterization of values based on incoming alert fields/attributes and supporting a mark-up language in issues templates. The mark-up language would expect parameters from the alert payloads that the user could then use to determine who to assign an issue to or how to label it.
For example if you had alerts tied to a particular service, it would be great if you could annotate those labels in the alert, then have that carry through to the issue template which would add the label to the issue upon creation.
Intended users
Sasha the Software Developer
Devon the DevOps Engineer
Sidney the Systems Administrator
Further details
This work contributes to the Incident Management Vision
Proposal
We can support the (due to #26764 (comment 521145192)) GitLab's Changelog Custom Template for our issue templates, and variables can be substituted based on incoming labels and annotations from Prometheus.Liquid
markup language
For example:
{% if alert.metric_query %}
Metric query: {{ it }}
{% end %}
{% each alert.annotations.labels %}
/label {{ it }}
{% end %}