Skip to content

[front] fix: paginate active user metrics query - #30219

Open
aubin-tchoi wants to merge 2 commits into
mainfrom
fix-user-query
Open

[front] fix: paginate active user metrics query#30219
aubin-tchoi wants to merge 2 commits into
mainfrom
fix-user-query

Conversation

@aubin-tchoi

Copy link
Copy Markdown
Contributor

Description

Active-user analytics can fail for high-activity workspaces because the nested daily user buckets can exceed Elasticsearch's per-response bucket limit.

This PR replaces the nested aggregation with a paginated composite aggregation over day and user, then merges every page before calculating DAU, WAU, and MAU. This also removes the previous 10,000-user-per-day truncation.

Tests

  • Added regression coverage for paginated user-day buckets.

Risk

  • Medium. Changes the Elasticsearch query strategy for active-user analytics.

Deploy Plan

  • Deploy front-api.

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
playground Ignored Ignored Preview Aug 7, 2026 4:47pm
storybook Ignored Ignored Preview Aug 7, 2026 4:47pm

Request Review

@dust-agent dust-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding Rules LGTM \o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant