Add VSA duration data series to GraphQL

What does this MR do and why?

This MR exposes the average daily durations data for a value stream stage via GraphQL.

How to set up and validate locally

  1. Ensure that you're on premium or on ultimate plan.
  2. Seed VSA: FILTER=cycle_analytics SEED_VSA=1 bundle exec rake db:seed_fu
  3. Go to the generated group
  4. Pick a filter (for example reaction emoji). Add reaction emoji to a few issues or MRs.
  5. Make sure data is aggregated: Analytics::CycleAnalytics::IncrementalWorker.new.perform
  6. Invoke a GraphQL query (ids might be different)

Example GraphQL query:

query test {
  group(fullPath: "vsmg-1722585516") {
    id
    valueStreams(id: "gid://gitlab/Analytics::CycleAnalytics::ValueStream/6") {
      nodes {
        id
        stages(id: "gid://gitlab/Analytics::CycleAnalytics::Stage/31") {
          id
          name
          metrics(timeframe: {start: "2024-05-01", end: "2024-09-30"}) {
            count {
              value
            }
            series {
              averageDurations {
                date
                value
              }
            }
          }
        }
      }
    }
  }
}

Related to #410339 (closed)

Edited by Adam Hegyi

Merge request reports

Loading