Add issue importers usage pings
What does this MR do?
Depends on !40130 (merged)
This MR adds usage ping data for Project Imports of the following importers:
- Jira
- Fogbugz
- Phabricator
Mentions #235425 (closed)
Query Explain
Jira
With timerange
explain SELECT COUNT(DISTINCT "jira_imports"."user_id") FROM "jira_imports" WHERE "jira_imports"."created_at" BETWEEN '2020-07-29 10:31:57.337227' AND '2020-08-26 10:31:57.337423' AND "jira_imports"."user_id" BETWEEN 1 AND 10000
https://explain.depesz.com/s/ZJGA
Without timarange
explain SELECT COUNT(DISTINCT "jira_imports"."user_id") FROM "jira_imports" WHERE "jira_imports"."user_id" BETWEEN 1 AND 10000
https://explain.depesz.com/s/b0JB
Fogbugz
With timerange
explain SELECT COUNT(DISTINCT "projects"."creator_id") FROM "projects" WHERE "projects"."import_type" = 'fogbugz' AND "projects"."created_at" BETWEEN '2020-07-27 09:18:09.605426' AND '2020-08-24 09:18:09.605489' AND "projects"."creator_id" BETWEEN 1 AND 10000
https://explain.depesz.com/s/Uskb
Without timerange
explain SELECT COUNT(DISTINCT "projects"."creator_id") FROM "projects" WHERE "projects"."import_type" = 'fogbugz' AND "projects"."creator_id" BETWEEN 1 AND 10000
https://explain.depesz.com/s/wOTN
Phabricator
With timerange
explain SELECT COUNT(DISTINCT "projects"."creator_id") FROM "projects" WHERE "projects"."import_type" = 'phabricator' AND "projects"."created_at" BETWEEN '2020-07-27 09:18:09.605426' AND '2020-08-24 09:18:09.605489' AND "projects"."creator_id" BETWEEN 1 AND 10000
https://explain.depesz.com/s/qo1j
Without timerange
explain SELECT COUNT(DISTINCT "projects"."creator_id") FROM "projects" WHERE "projects"."import_type" = 'phabricator' AND "projects"."creator_id" BETWEEN 1 AND 10000
https://explain.depesz.com/s/fz0n
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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