Skip to content

feat(api): Add a PUBLIC_EXPERIMENTAL publish status - #123914

Merged
DominikB2014 merged 2 commits into
masterfrom
dominikbuszowiecki/feat/api-public-experimental-status
Sep 11, 2026
Merged

feat(api): Add a PUBLIC_EXPERIMENTAL publish status#123914
DominikB2014 merged 2 commits into
masterfrom
dominikbuszowiecki/feat/api-public-experimental-status

Conversation

@DominikB2014

@DominikB2014 DominikB2014 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This Pr makes two changes:

  1. Adds PUBLIC_EXPERIMENTAL to ApiPublishStatus, filling the gap between an endpoint being invisible and being frozen under a permanent stability commitment — it is published, but free to change incompatibly. Plan is to make most of our private apis have this status, so code mode and external agents immediately benefit
  2. Set the /trace-items/metrics endpoint to public experiemental (the first example)

There is a complementary docs pr here getsentry/sentry-docs#19320, with a screenshot from me testing this all locally

Publication is now expressed once as ApiPublishStatus.is_published, and every gate that keyed on PUBLIC reads it (the OpenAPI filter, the S022 response-shape lint, and the Seer public-API matrix), so the new status clears the exact same documentation bar as PUBLIC rather than offering a shortcut past it. Because nothing downstream renders the x-sentry-experimental marker these operations now carry, the build also prepends a short notice to the rendered description — four endpoints were already hand-writing that warning into their docstrings in four different wordings, one of them buried at the end, and this standardizes on the most common of them. The trace-items/metrics endpoint adopts the status as the first user: publishing it pulls it into the Seer matrix, which needs its feature flag registered there, and it gains a response example, with its response TypedDicts moving to a *_types.py so the examples module can import them without a circular import. Follow-ups: a sentry-docs badge reading x-sentry-experimental to replace the text notice, the Sentaur bot tolerating the new public_experimental key in the ownership stats JSON, and migrating those four hand-rolled endpoints onto the status.

ApiPublishStatus offered only a permanent stability commitment or invisibility,
so endpoints that were ready to document but not to freeze parked in
EXPERIMENTAL indefinitely. Add PUBLIC_EXPERIMENTAL between them: published, but
free to change incompatibly.

Publication is now expressed once, as ApiPublishStatus.is_published, and every
gate keyed on PUBLIC reads it -- the OpenAPI filter, the S022 response-shape
lint, and the Seer public-API matrix -- so the new status is held to the exact
same bar as PUBLIC. Published operations carry x-sentry-experimental so docs can
distinguish them.

The trace-items/metrics endpoint adopts it as the first user. Publishing it
pulled it into the Seer matrix, which needs its feature flag registered, and it
gains a response example; the response TypedDicts move to a *_types.py so the
examples module can import them without a cycle.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 9, 2026
Nothing renders x-sentry-experimental, so on its own the marker ships inert and
a PUBLIC_EXPERIMENTAL endpoint reads as stable. Prepend a notice to the
operation description instead, which the docs already render.

Four endpoints had hand-written variants of this warning in their docstrings, in
four different wordings and one buried at the end of the text; the notice adopts
the most common of them.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e15807c. Configure here.

Comment thread tests/sentry/seer/endpoints/test_organization_agent_token.py
@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

ENG-8593

@DominikB2014
DominikB2014 requested a review from a team September 11, 2026 15:19
@DominikB2014
DominikB2014 marked this pull request as ready for review September 11, 2026 15:19
@DominikB2014
DominikB2014 requested review from a team as code owners September 11, 2026 15:19
@DominikB2014
DominikB2014 merged commit d916639 into master Sep 11, 2026
71 of 73 checks passed
@DominikB2014
DominikB2014 deleted the dominikbuszowiecki/feat/api-public-experimental-status branch September 11, 2026 16:26
DominikB2014 added a commit that referenced this pull request Sep 11, 2026
…124192)

Four `PUBLIC` endpoints (the two AI conversation endpoints, the autofix
state `GET`, and release threshold statuses) already warned in their
docstrings that they may change. This moves them to
`PUBLIC_EXPERIMENTAL` and removes the hand-written warnings, since the
docs hook added in #123914 now prepends a single notice.
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.

3 participants