Skip to content

Observability alert creation via a sidekiq worker

Max Woolf requested to merge opstrace/2813/alert-creation into master

What does this MR do and why?

Adds a sidekiq worker that queries Observability backend API for available alerts data and create new alerts in Gitlab.

Related to https://gitlab.com/gitlab-org/opstrace/opstrace/-/issues/2813.

  • Authentication is done in the same way a new service backend works for Cloud Connector (docs).
  • Adds a crontab for the worker to be run every minute.
  • Creates alerts using existing Alert management model.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Screenshot_2024-08-13_at_13.36.15

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Setup GDK with alert management integration enabled on a project.
  2. The worker can be run on the console with: > Observability::AlertQueryWorker.new.perform.
  3. While it is possible to test most of the functionality for alert creation via tests itself, additional GOB backend will be required to test end to end. See devvm.
  4. Generate rate limit events on GOB for the associated project.
  5. Run the worker on the console and alerts will be created.
Edited by Arun Sori

Merge request reports

Loading