Conversation
…ta, armor The command the project name promised. getop top renders a full-screen auto-refreshing view (Rich Live, --interval/-n, --once, --json) composing the existing read-only collectors: query volume/latency and quota from stats, connector states from ls, Model Armor hit counts from armor. Active users (24h/7d/30d) are derived from UserLicense.lastLoginTime: Gemini Enterprise exposes no active-user metric, and the analytics export writes to BigQuery (a mutation, off-charter), but anyone active in a trailing window necessarily has their last login inside it, so trailing DAU/WAU/MAU counts are exact as of now with no logging or extra IAM required. Historical curves are documented as out of reach (each login overwrites the previous timestamp). Panels are isolated: a failing source renders as unavailable with the error on the dashboard while the rest keep refreshing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
getop top— the command the project name promised. A full-screen, auto-refreshing (RichLive, alternate screen) dashboard composing existing read-only collectors:statscollectors (--sincewindow per refresh)lscollectorsarmorcollectors--interval/-n(min 10s, default 30s),--oncefor a snapshot,--jsonfor machine-readable output. Panels are isolated: a failing source renders as unavailable with its error shown while the rest keep refreshing.How DAU/WAU/MAU work (the research question behind this PR)
Gemini Enterprise exposes no active-user metric in Cloud Monitoring, and the console's analytics export API writes aggregates into BigQuery — a mutation, so off-limits for a read-only tool. But
UserLicense.lastLoginTimeupdates on login, and anyone active inside a trailing window necessarily has their last login inside it — so counting licenses withlastLoginTime ≥ now − 24h/7d/30dgives exact trailing DAU/WAU/MAU as of now, with no logging enabled and no IAM beyond what getop already needs. The documented limitation: historical curves can't be reconstructed (each login overwrites the timestamp); true per-day history needs the user-activity log, which requires observability logging.Verification
uv run pytest -q— 145 passed (7 new tests: trailing-window math incl. naive/garbage timestamps, panel-failure isolation via FakeClients' missing monitoring client, render smoke, unavailable-panel rendering;topadded to the CLI help guards)--onceand--once --since 24h): active-user tiles populated from license data (and immediately revealed a real adoption gap between assigned seats and monthly actives), quota and latency panels carried real data, connectors rendered with states🤖 Generated with Claude Code