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
- Ensure that you're on premium or on ultimate plan.
- Seed VSA:
FILTER=cycle_analytics SEED_VSA=1 bundle exec rake db:seed_fu - Go to the generated group
- Pick a filter (for example reaction emoji). Add reaction emoji to a few issues or MRs.
- Make sure data is aggregated:
Analytics::CycleAnalytics::IncrementalWorker.new.perform - 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