Repository navigation
feat(cli): add explore time series - #1657
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 85eace2. Configure here.
85eace2 to
93f1f55
Compare
BYK
left a comment
There was a problem hiding this comment.
Sorry but this is bad API design as the new flags make no sense on their own. So we should have a single flag, something like --time-buckets/-b which accepts what --interval takes now and enables time series mode (so dropping --time-series).
LMK if I'm missing anything.
|
@BYK not missing anything, I get your point but I wanted to use the i could see: sentry explore org/project --time-series auto
sentry explore org/project --time-series 15mand using |
|
Fine with |
d03a3a4 to
fd9eeea
Compare
BYK
left a comment
There was a problem hiding this comment.
I think we should use our built-in graphing engine that we use over at dasboard rendering for this btw.
Move UTC timestamp formatting to the shared time utilities without changing output.
a8d680a to
0ddcda7
Compare

Add
explore --time-series [auto|interval](-b) to inspect when an aggregate changes using the existing target, dataset, filters, and time range. A bare flag orautoselects a supported bucket width for the requested range; an explicit duration fixes the width. Each invocation returns a snapshot and exits. Omitting the flag preserves tabular queries, and--period(-t) continues to control the overall range.sentry explore my-org/my-project -t 1h -b 15m sentry explore my-org/my-project --dataset spans -F "p95(span.duration)" --time-series --period 24h --jsonHuman output shows a UTC table per aggregate and marks incomplete buckets. JSON preserves values, units, sampling, completeness, and ingestion metadata, including string and null values. The initial scope covers ungrouped aggregates for errors, spans, logs, and metrics; table-only flags are rejected in temporal mode. Automatic intervals grow when needed to stay within the bucket budget, while explicit intervals are never silently changed.
Bare flags follow the existing optional-value convention used by
--followand--refresh; place an explicit target before the flag when omitting its value. UTC timestamps use the shared time-formatting utilities.Includes generated documentation and coverage through the public SDK and real CLI HTTP flow. The SDK exposes
timeSeries: "auto"or a duration string. Time series retain existing boolean-query scoping, metric-expression validation, and field-error recovery.Validation: workspace typecheck and lint passed. Focused command and formatter checks passed (140 tests), plus the rebuilt CLI HTTP E2E. Coverage includes both bare-flag parser paths, explicit intervals, SDK calls, JSON projection, and UTC output under a non-UTC timezone.
The full workspace run passed all non-CLI suites and 11,486 CLI tests. Two established local limitations remain: the musl installer fixture fails on this macOS host, and asset-catalog integration requires the unavailable Xcode
actool. No live production query was repeated for this revision.