Skip to content

feat(apidocs): Publish issue stats as experimental - #131248

Merged
cvxluo merged 5 commits into
masterfrom
byk/feat/apidocs-issues-stats
Nov 16, 2026
Merged

cvxluo merged 5 commits into
masterfrom
byk/feat/apidocs-issues-stats

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Part of #131199.

sentry-tui loads its issue list the way the Issues page does: listOrganizationIssues with collapse=stats, and then the counts and sparklines from issues-stats. It reads both through the generated @sentry/api SDK, which only has published operations, and issues-stats is unpublished.

Endpoint Decision Reason
GET /organizations/{org}/issues-stats/ (OrganizationGroupIndexStatsEndpoint) PRIVATE → PUBLIC_EXPERIMENTAL as listOrganizationIssueStats The user-facing half of the published issue list, with no other way to get those stats. Experimental, so it isn't a firm promise yet.

Docs, checked against the handler:

  • Parameters:
    • groups: required, at most 100.
    • The ones the published issue list already documents: environment, project, statsPeriod/start/end (and statsPeriodStart/statsPeriodEnd), groupStatsPeriod, query and expand. query feeds the filtered counts through build_query_params_from_request.
  • collapse gets its own IssueParams.STATS_COLLAPSE. Here it defaults to ["base"], and passing any value replaces that default.
  • Response: list[StreamGroupSerializerSnubaResponse], the published issue-list type. Every field except id is NotRequired, so it fits the collapsed rows StreamGroupSerializerSnuba returns by default.
  • Tagged Events, like listOrganizationIssues. The old RST docstring is now a short description.

Behavior, permissions, rate limits and responses stay the same, and nothing breaks. The spec only gains this one operation.

The agent-token permission matrix picks up the row, with a groups query param.

Moving sentry-tui or the CLI onto this operation waits for an @sentry/api release that includes it.

--

View Session [Sentry]

The organization issue stats endpoint moves to PUBLIC_EXPERIMENTAL as
listOrganizationIssueStats, with the parameters the handler reads and
the published StreamGroupSerializerSnubaResponse shape. collapse gets
its own parameter because it defaults to base here. No behavior change.

Part of #131199
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 16, 2026 14:11
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 16, 2026
…sues-stats

# Conflicts:
#	tests/sentry/seer/endpoints/test_organization_agent_token.py
Restores the old docstring's point that start and end must be sent
together, per review.

Part of #131199
This reverts commit 6bb5641. Per review, the shared start and end
parameter docs keep this endpoint consistent with the others.

Part of #131199
@cvxluo
cvxluo merged commit 6e1b9b4 into master Nov 16, 2026
82 checks passed
@cvxluo
cvxluo deleted the byk/feat/apidocs-issues-stats branch November 16, 2026 18:58

This branch was successfully deployed

1 active deployment
Preview — bcc5f58e Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant