Repository navigation
fix(cli): explain rejected Explore field expressions - #1661
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
betegon
force-pushed
the
bt/cli-explore-query-contract
branch
from
October 25, 2026 21:42
91d18a8 to
662055b
Compare
betegon
force-pushed
the
bt/cli-explore-error-recovery
branch
from
October 26, 2026 12:41
95d64f5 to
34b2ede
Compare
betegon
marked this pull request as ready for review
October 26, 2026 13:27
betegon
force-pushed
the
bt/cli-explore-error-recovery
branch
from
October 26, 2026 13:28
34b2ede to
b2d23a6
Compare
This branch was previously deployed
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.
When Explore rejects
count(span), logmin/max(timestamp), or an unsupported function, the current API error gives callers little guidance on recovering within the CLI.Add dataset-aware hints tied to the explicit
--fieldor--sortexpression that reached the request, retaining the backend diagnostic. Log timestamp hints explain thattimestamp_preciseaggregates return Unix nanoseconds. Unknown failures and invalid defaults or generated metric expressions keep their original API error classification. Queries are neither rewritten nor retried.Before / after
Counting spans
Before: the API diagnostic says
span is invalid for parameter 1 in count, without explaining the correction.After: the error identifies
--field "count(span)"and datasetspans, preserves the backend detail, and adds:The caller can retry with:
Finding the earliest log time
sentry explore example-org/ --dataset logs -F 'min(timestamp)'Before: the API reports that
timestamphas the wrong type formin.After: the error identifies the rejected field and dataset, preserves the backend detail, and adds:
The caller can retry with:
sentry explore example-org/ --dataset logs -F 'min(timestamp_precise)'Validation: 15 regression cases covering recovery, error identity, generated input, and pagination state; full repository typecheck and lint; three authenticated read-only API probes confirming the expected validation exit code and recovery messages.