Automatically embed metrics in issue for all gitlab-configured alerts
### Problem to solve Charts help users visualize what went wrong with triaging an incident. If a particular threshold was exceeded, we can reduce time spent during investigation by automatically embedding the relevant metrics chart in the issue. ### Intended users [Sasha the Software Developer](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer) [Devon the DevOps Engineer](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#devon-devops-engineer) [Sidney the Systems Administrator](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sidney-systems-administrator) ### Further details This work contributes to the [Incident Management Vision](https://about.gitlab.com/direction/monitor/debugging_and_health/incident_management/) ### Proposal The first iteration will involve metrics for GitLab-configured alerts (where a chart already exists on our metrics dashboard). We would: * Find the metric and use the corresponding dashboard/embed configuration including chart title, units, etc. * Automatically embed a chart visualization for the metric that triggered the alert. Set the time frame to be event time +/- 30 minutes. The chart should display in the issue description, after the summary and before the alert details (ie, the rest of the alert payload). ### Out of scope for this iteration * Embedding metrics in issue from Prometheus alerts not created in GitLab. Will be tackled in https://gitlab.com/gitlab-org/gitlab/issues/195739 * Embedding metrics in issues created from alerts triggered by the generic alert endpoint <!-- How are we going to solve the problem? Try to include the user journey! https://about.gitlab.com/handbook/journeys/#user-journey --> ### Permissions and Security <!-- What permissions are required to perform the described actions? Are they consistent with the existing permissions as documented for users, groups, and projects as appropriate? Is the proposed behavior consistent between the UI, API, and other access methods (e.g. email replies)?--> ### Documentation <!-- See the Feature Change Documentation Workflow https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html Add all known Documentation Requirements here, per https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html#documentation-requirements If this feature requires changing permissions, this document https://docs.gitlab.com/ee/user/permissions.html must be updated accordingly. --> ### Testing <!-- What risks does this change pose? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? See the test engineering process for further help: https://about.gitlab.com/handbook/engineering/quality/test-engineering/ --> ### What does success look like, and how can we measure that? <!-- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this. --> ### What is the type of buyer? <!-- Which leads to: in which enterprise tier should this feature go? See https://about.gitlab.com/handbook/product/pricing/#four-tiers --> ### Links / references
issue