Skip to content

feat(apidocs): Publish monitor and uptime stats as experimental - #131246

Merged
DominikB2014 merged 1 commit into
masterfrom
byk/feat/apidocs-crons-stats
Nov 16, 2026
Merged

DominikB2014 merged 1 commit into
masterfrom
byk/feat/apidocs-crons-stats

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Part of #131199.

sentry-tui needs the check-in and uptime-check timelines that the Crons and Uptime list pages draw. It reads them through the generated @sentry/api SDK, which only has published operations. Both endpoints are unpublished.

Endpoint Decision Reason
GET /organizations/{org}/monitors-stats/ (OrganizationMonitorIndexStatsEndpoint) PRIVATE → PUBLIC_EXPERIMENTAL as listOrganizationMonitorStats User-facing data with no published equivalent. It's experimental because the handler is marked for a move to Snuba.
GET /organizations/{org}/uptime-stats/ (OrganizationUptimeStatsEndpoint) EXPERIMENTAL → PUBLIC_EXPERIMENTAL as listOrganizationUptimeStats Same: user-facing with no published equivalent. It's still evolving, so it isn't a firm promise.

Docs, checked against the handlers:

  • Parameters: monitor (GUIDs, up to 20) and uptimeDetectorId (required, up to 100). Also since/until from StatsMixin._parse_args, each endpoint's resolution rules (any Ns/m/h/d for monitors; for uptime, the EAP granularities), project and, for monitors, environment. since/until live in a new StatsRangeParams class.
  • Responses: a map from monitor GUID or uptime monitor ID to [timestamp, counts] pairs. The count keys come from CheckInStatus (monitors) and from the four uptime outcomes the handler always fills in.
  • The uptime endpoint's tag changes from Uptime Monitors to Crons, the tag the published uptime endpoints use. Uptime Monitors isn't a defined spec tag, so the build rejects it.
  • The response types sit in the endpoint modules. Each get now declares its Response[...] type. The monitor handler still builds [ts, counts] lists, and a cast maps them to the documented pair type. The JSON and response.data stay the same.

Behavior, permissions and responses stay the same, and nothing breaks. The spec only gains these two operations.

The agent-token permission matrix picks up both rows. They needed query params and an uptime monitor fixture.

Moving sentry-tui or the CLI onto these operations waits for an @sentry/api release that includes them.

--

View Session [Sentry]

The organization monitor check-in stats and uptime check stats endpoints
move to PUBLIC_EXPERIMENTAL with full extend_schema docs: token
operationIds, every query parameter the handlers read, and typed
responses. No behavior change.

Part of #131199
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 16, 2026 14:01
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 16, 2026
@DominikB2014
DominikB2014 enabled auto-merge (squash) November 16, 2026 14:02
@DominikB2014
DominikB2014 merged commit 2c050f2 into master Nov 16, 2026
82 checks passed
@DominikB2014
DominikB2014 deleted the byk/feat/apidocs-crons-stats branch November 16, 2026 14:51
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