Skip to content

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

Draft
DominikB2014 wants to merge 2 commits into
masterfrom
dominikbuszowiecki/feat/api-public-experimental-status
Draft

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

Conversation

@DominikB2014

@DominikB2014 DominikB2014 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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. 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.

"OrganizationProfilingChunksEndpoint": "organizations:continuous-profiling",
"OrganizationProfilingFlamegraphEndpoint": "organizations:profiling",
"OrganizationTraceItemAttributesEndpoint": "organizations:visibility-explore-view",
"OrganizationTraceItemMetricsEndpoint": "organizations:visibility-explore-view",

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.

Seer matrix missing metrics query mock

Medium Severity

Publishing OrganizationTraceItemMetricsEndpoint pulls it into the Seer public-API matrix, and the feature flag was registered so the request no longer 404s. The matrix still has no downstream mock for TraceMetrics.run_table_query, unlike the sibling EAP endpoints, so the baseline GET is likely to 500 instead of the required 200.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e15807c. Configure here.

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