Skip to content

docs(agents): add extraction span manual instrumentation - #20427

Merged
ArthurKnaus merged 1 commit into
masterfrom
arthurknaus/agt-3212-manual-instrumentation-docs-for-extraction-spans
Nov 4, 2026
Merged

ArthurKnaus merged 1 commit into
masterfrom
arthurknaus/agt-3212-manual-instrumentation-docs-for-extraction-spans

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

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

Refs AGT-3212

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • 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

via @ArthurKnaus.

--

View Session [Sentry]

Document the gen_ai.extract span in the JavaScript and Python agent
tracing manual instrumentation guides, following getsentry/sentry-conventions#728.

Refs AGT-3212

Co-Authored-By: Arthur Knaus <7033940+ArthurKnaus@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Nov 3, 2026 5:06pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Nov 3, 2026 5:06pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

AGT-3212

@codeowner-assignment
codeowner-assignment Bot requested a review from a team November 3, 2026 17:00
@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Nov 3, 2026
@ArthurKnaus
ArthurKnaus requested a review from a team November 4, 2026 14:09
@ArthurKnaus
ArthurKnaus marked this pull request as ready for review November 4, 2026 14:09
@cursor

cursor Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Getting ready to monitor this change · Rollout details

Status Service Environment
⏳ Getting ready to monitor this change

@ArthurKnaus
ArthurKnaus merged commit 537c8a1 into master Nov 4, 2026
28 checks passed
@ArthurKnaus
ArthurKnaus deleted the arthurknaus/agt-3212-manual-instrumentation-docs-for-extraction-spans branch November 4, 2026 16:04

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — d5cae253 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants