Skip to content

Add GraphQL for product analytics usage for a group and its projects

Max Woolf requested to merge 424154-product-analytics-usage-data-interface into master

What does this MR do and why?

  • Adds the ability for project maintainers to get a count of the number of events stored by product analytics per project per month.
  • Adds a graphQL interface to enable access to that data.
  • Ensure that you're running the devkit with the latest version of the analytics-configurator.
  • tidyup Also moves ProductAnalytics::Settings to EE as its unused in CE and shouldn't be there.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  • Use a project set up for product analytics - ensure some data is stored.
  • Run the following query as a maintainer+ on the project:
query {
  project(fullPath: "PATHTOPROJECT") {
      name
      productAnalyticsEventsStored
  }
}
  • The result should include the number of events stored that were created in the current calendar month.
  • You can also override the month and year parameters:
query {
  project(fullPath: "PATHTOPROJECT") {
      name
      productAnalyticsEventsStored(year: 2023, month: 9)
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #424154 (closed)

Edited by Max Woolf

Merge request reports