Create metrics to track usage of GitLab for Jira App"
What does this MR do and why?
What?
Adds metrics for tracking our GitLab For Jira App installation usage by GitLab SaaS and Gitlab Self-Managed. It counts only installation with subscriptions (active installation).
Why?
After exploring our Jira related metrics, it appears we don't currently have a metric tracking our GitLab For Jira App integration usage.
We'd like to explore our metrics and capture usage by GitLab SaaS and Gitlab Self-Managed users.
Our PI Metrics today are based on https://metrics.gitlab.com/?q=redis_hll_counters.ecosystem.ecosystem_total_unique_counts_monthly. We need to ensure GitLab for Jira App usage is captured by that metric.
Migration output
up
main: == 20220916103311 AddIndexOnJiraConnectInstallationsInstanceUrl: migrating ====
main: -- transaction_open?()
main: -> 0.0000s
main: -- index_exists?(:jira_connect_installations, :instance_url, {:name=>"index_jira_connect_installations_on_instance_url", :algorithm=>:concurrently})
main: -> 0.0052s
main: -- add_index(:jira_connect_installations, :instance_url, {:name=>"index_jira_connect_installations_on_instance_url", :algorithm=>:concurrently})
main: -> 0.0021s
main: == 20220916103311 AddIndexOnJiraConnectInstallationsInstanceUrl: migrated (0.0123s)
down
main: == 20220916103311 AddIndexOnJiraConnectInstallationsInstanceUrl: reverting ====
main: -- transaction_open?()
main: -> 0.0001s
main: -- indexes(:jira_connect_installations)
main: -> 0.0068s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0005s
main: -- remove_index(:jira_connect_installations, {:algorithm=>:concurrently, :name=>"index_jira_connect_installations_on_instance_url"})
main: -> 0.0021s
main: -- execute("RESET statement_timeout")
main: -> 0.0005s
main: == 20220916103311 AddIndexOnJiraConnectInstallationsInstanceUrl: reverted (0.0264s)
Screenshots or screen recordings
How to set up and validate locally
- Checkout the
360703-create-gitlab_for_jira_app_saas_active-and-gitlab_for_jira_app_self_managed_active-metrics
branch - Start the app
- Run
bin/rake gitlab:usage_data:dump_sql_in_yaml > ~/Desktop/usage-metrics-today.yaml
- Validate that
gitlab_for_jira_app_saas_active
andgitlab_for_jira_app_self_managed_active
are included in the output
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #360703 (closed)