Repository navigation
docs(develop): Document decision and extraction message structure - #20107
Open
andreiborza wants to merge 6 commits into
Open
andreiborza wants to merge 6 commits into
andreiborza wants to merge 6 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
andreiborza
marked this pull request as ready for review
October 21, 2026 12:14
Contributor
|
Please update the IS YOUR CHANGE URGENT? section of the PR description:
This information helps the Docs team prioritize your review. |
cleptric
approved these changes
Oct 22, 2026
1 of 6 tasks
ArthurKnaus
added a commit
that referenced
this pull request
Nov 4, 2026
## DESCRIBE YOUR PR Documents the `gen_ai.extract` span in the agent tracing manual instrumentation guides, modeled on the existing Decision and Memory span sections. Follows [sentry-conventions#728](getsentry/sentry-conventions#728), which adds the experimental `gen_ai.extract` op, the `extract` operation name, and the extraction shapes for `gen_ai.input.messages` / `gen_ai.output.messages`. - Add an "Extraction Span" section to the JavaScript and Python manual instrumentation pages, placed after "Decision Span". The example uses a Clairic invoice extraction (same data as the conventions examples): `gen_ai.extract` op, `extract {model}` name, `gen_ai.operation.name: "extract"`, the request body without `model` as input messages, and the response body without `model` and `usage` as output messages - Add a shared `extraction-span` attributes include: required op/name/operation name, model, provider, and agent attributes, token usage, and the input format (`state`, `fields`, `images`, `reference_date`, `options`, plus field spec types) and output format (`answers`, `truncated`, `span`/`spans` offsets) - JS page links to the Workers AI integration, which creates these spans automatically for Clairic since `@sentry/cloudflare` 11.10.0 Attribute values were checked against sentry-conventions (`model/op/gen_ai.json`, `gen_ai.operation.name`, `gen_ai.input.messages`, `gen_ai.output.messages`), the JS Workers AI instrumentation (`cloudflare.workers_ai` provider name), and the product's extraction parser (spans are recognized by `gen_ai.operation.name`). **Open questions before ready for review** - The field-level message format overlaps with the develop-docs spec in #20107 (still open). Once that merges, should the include link there instead of repeating the field tables? - The existing Decision span docs still show `{type: "evaluation", ...}` wrappers, which the current conventions examples and #20107 drop. Out of scope here, but worth a follow-up. Refs [AGT-3212](https://linear.app/getsentry/issue/AGT-3212/manual-instrumentation-docs-for-extraction-spans) ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) <!-- junior-request-attribution:start --> via @ArthurKnaus. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0BQH18P75H%3A1793724768.708079 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BQH18P75H%3A1793724768.708079) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BQH18P75H%3A1793724768.708079/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Arthur Knaus <7033940+ArthurKnaus@users.noreply.github.com>
This branch was successfully deployed
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.
What
Documents the JSON fields of the decision and extraction input and output messages, and adds the Extraction Span (
gen_ai.extract) from getsentry/sentry-conventions#728.Why
Other SDKs need to know what to send for these spans and how to map provider data to it.