Skip to content

feat(attributes): Add experimental gen_ai.extract operation - #728

Merged
andreiborza merged 10 commits into
mainfrom
ab/gen-ai-extract
Oct 23, 2026
Merged

andreiborza merged 10 commits into
mainfrom
ab/gen-ai-extract

Conversation

@andreiborza

@andreiborza andreiborza commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

What

Adds a gen_ai.extract op and extract operation name for typed field extraction models, such as Cloudflare's Clairic. The messages record the extraction request and response as the provider sent them.

For the input/output message structure see getsentry/sentry-docs#20107.

Why

Extraction models return typed values from a state, and this does not fit chat or decide spans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-conventions Ready Ready Preview Oct 23, 2026 9:34am UTC

Request Review

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add experimental gen_ai.extract operation by andreiborza in #728
  • Remove next_trace from the sentry.link.type values by s1gr1d in #739
  • Add server_request as a sentry.link.type value by s1gr1d in #738
  • Add LCP and INP subpart attributes by logaretm in #712
  • Add message_origin as a sentry.link.type value by JPeer264 in #724
  • Add aws.lambda.resource_mapping.id attribute by pabloDeputter in #710
  • Add object to the sentry.category values by pabloDeputter in #721
  • Add http.request.duration by loewenheim in #697

Names

  • Add span name rules for rpc spans by pabloDeputter in #714
  • Add queue.publish/create/receive/process/settle to messaging span names by pabloDeputter in #705

Other

  • (descriptions) AWS Lambda function descriptions by pabloDeputter in #720
  • (docs) Add metrics page by logaretm in #733
  • (gen_ai) Add tool call result size attribute by obostjancic in #679
  • (metrics) Add browser bfcache and element timing metrics by logaretm in #729
  • (ops) Add object.copy op by pabloDeputter in #706
  • Add view.render op by alexander-alderman-webb in #699

Bug Fixes 🐛

  • (attributes) Apply consistent scrubbing across deprecations by mjq in #692

Documentation 📚

  • (cache) Define cache.ttl for fractional and per-read TTLs by s1gr1d in #726
  • Clarify cache.ttl for 0, no expiry, and reads by s1gr1d in #725

Internal Changes 🔧

Deps

  • Bump nanoid to 3.3.20 by Lms24 in #737
  • Bump vite from 8.2.1 to 8.3.5 by dependabot in #735
  • Bump markdown-it from 15.0.2 to 15.0.3 by dependabot in #736

Other

  • (attributes) Scrub S3 object keys by default by pabloDeputter in #713
  • (node) Bump Node to 22.23.4 by oioki in #742
  • (repo) Update CODEOWNERS to include @giortzisg by Lms24 in #708
  • Deprecate gen_ai.responses in favor of gen_ai.chat by alexander-alderman-webb in #703
  • Add deprecated messaging ops set by the Python SDK by alexander-alderman-webb in #693
  • Add view.response.render op, deprecated in favor of view.render by alexander-alderman-webb in #700
  • Add event.django op, deprecated in favor of function by alexander-alderman-webb in #698

🤖 This preview updates automatically when you update the PR.

andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request Oct 22, 2026
… spans (#25624)

## What

Workers AI calls to Cloudflare Clairic (`@cf/cloudflare/clairic`) now
create `extract <model>` spans with op `gen_ai.extract`, instead of
`chat` spans without messages.

- Records the request and response bodies as input and output messages,
with images replaced by `[Blob substitute]`
- Records the response model and token usage
- Adds unit tests and a Cloudflare integration test

## Why

Clairic is a typed field extraction model, and the new extraction span
spec (getsentry/sentry-conventions#728) covers it. The op is a local
constant until the conventions release.

Ref #25615

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@andreiborza
andreiborza merged commit ebc8ba0 into main Oct 23, 2026
18 checks passed
@andreiborza
andreiborza deleted the ab/gen-ai-extract branch October 23, 2026 09:38
nicohrubec pushed a commit to getsentry/sentry-javascript that referenced this pull request Oct 27, 2026
…#25734)

Follow-up to #25624. The `gen_ai.extract` op shipped in
`@sentry/conventions` 0.28.0 (getsentry/sentry-conventions#728), and the
repo already depends on 0.29.0, so the local `GEN_AI_EXTRACT_OP`
placeholder is replaced with the `GEN_AI_EXTRACT` export from
`@sentry/conventions/op`. No dependency bump or behavior change.

Ref #25615

<!-- junior-request-attribution:start -->
via **Jan Peer Stöcklmair**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0CA6TD3QRK%3A1792966562.069879 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CA6TD3QRK%3A1792966562.069879)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CA6TD3QRK%3A1792966562.069879/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Jan VamPeer Stöcklmair <jan.peer@sentry.io>

This branch was successfully deployed

1 active deployment
Preview — 085754be Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants