Skip to content

Add projects_with_enabled_alert_integrations usage ping

What does this MR do?

Contributes to #263521 (closed)

Add projects_with_enabled_alert_integrations usage ping to count projects with at least 1 enabled integration.

DB query

The query generated by the call:

::Gitlab::UsageData.distinct_count(::AlertManagement::HttpIntegration.active, :project_id)

Queries:

SELECT MIN("alert_management_http_integrations"."project_id")
FROM "alert_management_http_integrations"
WHERE "alert_management_http_integrations"."active" = TRUE

SELECT MAX("alert_management_http_integrations"."project_id")
FROM "alert_management_http_integrations"
WHERE "alert_management_http_integrations"."active" = TRUE

SELECT COUNT(DISTINCT "alert_management_http_integrations"."project_id")
FROM "alert_management_http_integrations"
WHERE "alert_management_http_integrations"."active" = TRUE
  AND "alert_management_http_integrations"."project_id" >= 1
  AND "alert_management_http_integrations"."project_id" < 10000

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Vitali Tatarintev

Merge request reports