Skip to content

Add telemetry for instance-level and template integrations

What does this MR do?

To measure the adoption of the new instance-level integration settings, we need to add data to usage ping that lets us know how many instances have a given integration enabled at the instance-level. We also need to track the template usage to measure the transition.

This merge request adds a new counter for each integration following these patterns:

  • instances_#{service_name}_active
  • templates_#{service_name}_active

SQL Queries

EXPLAIN SELECT COUNT("services"."id")
FROM   "services"
WHERE  "services"."active" = TRUE
       AND "services"."template" = TRUE
       AND "services"."type" = 'MattermostService'
       AND "services"."id" BETWEEN 0 AND 99999;
Time: 0.305 ms
  - planning: 0.254 ms
  - execution: 0.051 ms

https://explain.depesz.com/s/dk5U

EXPLAIN SELECT COUNT("services"."id")
FROM   "services"
WHERE  "services"."active" = TRUE
       AND "services"."instance" = TRUE
       AND "services"."type" = 'MattermostService'
       AND "services"."id" BETWEEN 0 AND 99999;
Time: 0.270 ms
  - planning: 0.220 ms
  - execution: 0.050 ms

https://explain.depesz.com/s/eB8o

Related to #204802 (closed) and #208308 (closed)

Edited by Arturo Herrero

Merge request reports

Loading