Repository navigation
docs(api): Document trace item validate, ranked, and trace logs endpoints - #126626
Merged
DominikB2014 merged 1 commit intoOct 7, 2026
Merged
DominikB2014 merged 1 commit into
DominikB2014 merged 1 commit into
Conversation
…ints Add OpenAPI schemas and response types for the three endpoints. All stay PRIVATE. Fixes ENG-8772
DominikB2014
force-pushed
the
dominikbuszowiecki/eng-8772-document-trace-items-eap-endpoints
branch
from
October 6, 2026 19:47
9447f2f to
cd20b3f
Compare
DominikB2014
marked this pull request as ready for review
October 7, 2026 14:36
edwardgou-sentry
approved these changes
Oct 7, 2026
DominikB2014
deleted the
dominikbuszowiecki/eng-8772-document-trace-items-eap-endpoints
branch
October 7, 2026 14:54
This was referenced Oct 15, 2026
BYK
added a commit
that referenced
this pull request
Nov 7, 2026
Publishes `GET
/api/0/organizations/{organization_id_or_slug}/trace-logs/`
(`OrganizationTraceLogsEndpoint`, owner Data Browsing) in the public API
schema, so it reaches the generated `@sentry/api` SDK.
This comes from the #130351 proposal. The Sentry CLI is moving every
call onto `@sentry/api` operations (getsentry/toolkit#2073), and `log
list` and `trace logs` still call this endpoint by hand because it isn't
in the schema.
Evidence:
- The endpoint has existed since #92501 (2025-05). #126626 documented it
fully with `extend_schema` but left it `PRIVATE`.
- Current callers: the trace view and logs explore pages
(`useTraceOverviewData`, `useLogsApiOptions`) and the CLI's `log list`
and `trace logs` commands.
The response type was `list[dict[str, Any]]`, which the
response-coverage check rejects for public operations. The endpoint
always selects the same eight columns, so each row is now a `TraceLog`
TypedDict, and every field has an `ApiDescription`. I checked the types
against a real response from the endpoint: `project.id` and
`timestamp_precise` are integers, `timestamp` is ISO 8601, and
`confidence` is one empty object per row because logs aren't aggregated.
The example's `timestamp_precise` was a float, so it's now an integer.
`full_scan`, `bytes_scanned` and `routingHint` are optional, because a
mocked or empty RPC meta can leave them out.
The only change to the built schema (`make build-api-docs`, diffed
against master) is the new `listOrganizationTraceLogs` operation and its
`TraceLogsResponse` component. The new apidocs test validates a stored
log against the schema.
`tests/snuba/api/endpoints/test_organization_trace_logs.py::test_simple`
failed once under `-n3` because tests share trace IDs in Snuba. It
passes when the file runs serially.
The "(Optional) Shows the difference between the prod and dev schema"
check is expected to fail, because this PR changes the schema.
<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A22c5e57fa755cece5122380dcb72ec8e -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A22c5e57fa755cece5122380dcb72ec8e)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A22c5e57fa755cece5122380dcb72ec8e/?project=4510944073809921)
<!-- junior-session-footer:end -->
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
@extend_schemadocs (params, response types, examples) for:POST /organizations/{org}/trace-items/attributes/validate/GET /organizations/{org}/trace-items/attributes/ranked/GET /organizations/{org}/trace-logs/All stay
PRIVATEfor now. Part of ENG-8606.Fixes ENG-8772