Repository navigation
feat(analytics): add admin analytics for hosted sites - #262
Merged
Merged
Conversation
Serve GET /api/v2/admin/analytics/sites for administrators: publishing activity, publishers, current site states, endings, TTL extensions, lifetimes, visibility, and the largest live sites. The endpoint reads existing site, version, and audit records and adds no migrations.
Reject NUL characters in Sites filters, end expired sites at their expiry time rather than the cleanup time, and keep negative lifetimes in the first bin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
GET /api/v2/admin/analytics/sites(administrator only) for a new Sites view in Analytics.ownerKind,visibility, andowner(an opaque publisher key returned inpublisherOptions).Test plan
EXPLAIN ANALYZEon a synthetic dataset with 50k sites, 200k versions, and 500k audit events: about 0.9 s for all queries combined, with a 180-day scan.