Skip to content

Add telemetry for projects inheriting instance settings

What does this MR do?

This merge request adds new counters following the pattern projects_inheriting_instance_#{service_name}_active.

The new counters allow us to know the actual usage to determine how it's getting used, instead of just that it's getting used.

SQL Queries

EXPLAIN SELECT MIN("services"."id")
FROM "services"
WHERE "services"."active" = TRUE
  AND "services"."inherit_from_id" IS NOT NULL
  AND "services"."type" = 'JiraService';
Time: 0.480 ms
  - planning: 0.412 ms
  - execution: 0.068 ms

Query Plan https://explain.depesz.com/s/8cZI

EXPLAIN SELECT MAX("services"."id")
FROM "services"
WHERE "services"."active" = TRUE
  AND "services"."inherit_from_id" IS NOT NULL
  AND "services"."type" = 'JiraService'
Time: 0.523 ms
  - planning: 0.417 ms
  - execution: 0.106 ms

Query Plan https://explain.depesz.com/s/N9J8

EXPLAIN SELECT COUNT("services"."id")
FROM "services"
WHERE "services"."active" = TRUE
  AND "services"."inherit_from_id" IS NOT NULL
  AND "services"."type" = 'JiraService'
  AND "services"."id" BETWEEN 0 AND 99999;
Time: 0.314 ms
  - planning: 0.255 ms
  - execution: 0.059 ms

Query Plan https://explain.depesz.com/s/Dtqi

Related to #204802 (closed)

Edited by Arturo Herrero

Merge request reports