Skip to content

explore: document sortable-dataset contract, drop dead discover entry - #1524

Merged
BYK merged 1 commit into
mainfrom
issue-1523-sortable-datasets-canonical-source
Sep 2, 2026
Merged

explore: document sortable-dataset contract, drop dead discover entry#1524
BYK merged 1 commit into
mainfrom
issue-1523-sortable-datasets-canonical-source

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1520. Investigates whether a canonical, machine-readable source exists for "which datasets accept a sort on grouped aggregates" and records the finding.

Result: no such source exists today. The OpenAPI spec (@sentry/api listOrganizationEvents) models sort as a flat query param whose only documented constraint is "must be in the field list" — it does not encode per-dataset sort capability, and there is no dataset-capability introspection endpoint. The spec's dataset enum (errors | logs | profile_functions | spans | tracemetrics | uptime_results) does not even include discover.

Given that, the hand-curated SORTABLE_DATASETS set stays, but:

  • The discover entry is removed — it was unreachable, since discover is not a valid --dataset value (see DATASET_ALIASES).
  • The doc comment now records the research findings as an explicit contract, with a note to revisit if Sentry ships a per-dataset capability contract.

Testing

vitest run test/commands/explore.test.ts (40 passed) and test/lib/api/explore.test.ts (18 passed); biome clean on the changed file.

Refs #1523

There is no machine-readable canonical source for which datasets accept a
sort param: the OpenAPI spec (@sentry/api listOrganizationEvents) models
sort as a flat query param and has no dataset-capability endpoint, and its
dataset enum does not include discover. Since discover is not a valid
--dataset value (see DATASET_ALIASES), the discover entry in
SORTABLE_DATASETS was unreachable; remove it and record the findings as a
documented contract instead.

Fixes #1523
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Sep 2, 2026 2:21pm UTC

Request Review

@jared-outpost
jared-outpost Bot marked this pull request as ready for review September 2, 2026 14:29
@jared-outpost
jared-outpost Bot requested a review from BYK September 2, 2026 14:29
@jared-outpost

jared-outpost Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

CI green (4s), self-review clean. Ready for review.

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Sep 2, 2026
@BYK
BYK merged commit a385b56 into main Sep 2, 2026
33 checks passed
@BYK
BYK deleted the issue-1523-sortable-datasets-canonical-source branch September 2, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant