Skip to content

feat(server-utils): Record Workers AI Jev and Clef calls as gen_ai.decide spans - #25272

Merged
andreiborza merged 2 commits into
developfrom
ab/workers-ai-decide-spans
Oct 12, 2026
Merged

andreiborza merged 2 commits into
developfrom
ab/workers-ai-decide-spans

Conversation

@andreiborza

Copy link
Copy Markdown
Member

What

Workers AI calls to TypeSafe Jev and Cloudflare Clef models now create decide <model> spans with op gen_ai.decide, instead of gen_ai.evaluate.

Why

gen_ai.evaluate is deprecated in favor of gen_ai.decide (getsentry/sentry-conventions#696), to match the Vercel AI rename to experimental_decide.

Closes: #25250

@andreiborza
andreiborza marked this pull request as ready for review October 12, 2026 11:53
@andreiborza
andreiborza requested a review from a team as a code owner October 12, 2026 11:53
@andreiborza
andreiborza requested review from JPeer264, isaacs, mydea and nicohrubec and removed request for a team, isaacs and mydea October 12, 2026 11:53
@andreiborza
andreiborza merged commit c20e4f2 into develop Oct 12, 2026
279 checks passed
@andreiborza
andreiborza deleted the ab/workers-ai-decide-spans branch October 12, 2026 11:58
andreiborza added a commit to getsentry/sentry-docs that referenced this pull request Oct 14, 2026
## DESCRIBE YOUR PR

Follows [sentry-javascript
11.7.0](https://github.com/getsentry/sentry-javascript/releases/tag/11.7.0)
([#25270](getsentry/sentry-javascript#25270),
[#25272](getsentry/sentry-javascript#25272),
[#25274](getsentry/sentry-javascript#25274),
[#25281](getsentry/sentry-javascript#25281)). In
that release, Vercel AI, TypeSafe, LangChain/LangGraph, Workers AI, and
Mastra classifier spans changed from `gen_ai.evaluate` / `evaluate
<model>` to `gen_ai.decide` / `decide <model>`.

- Vercel AI: documents `experimental_decide()` (Sentry SDK `11.7.0`+, AI
SDK `7.0.128`+) instead of `experimental_evaluate()`. The "Trace Jev
Evaluations" section is now "Trace Jev Decisions" (anchor
`#trace-jev-decisions`), and it links to the AI SDK's new
[Decisions](https://ai-sdk.dev/docs/ai-sdk-core/decisions) page.
- TypeSafe, LangChain, LangGraph, Workers AI, and Mastra (the classifier
page and the span-type table) now give the span op and name as
`gen_ai.decide` and `decide <model>`.
- To keep things simple, every decide-span section uses `11.7.0` as its
minimum SDK version (`AvailableSince`, requirement lines, and Mastra's
supported versions), and the pages don't describe older SDK behavior.
- Links that pointed to the old Vercel AI anchor or to
`experimental_evaluate()` are updated.

#19938 already updated the manual instrumentation and shared
span-attribute docs. The LangChain/Mastra "Classifier Evaluations"
headings stay as they are, because those are the frameworks' own terms.

## 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 **Andrei Borza**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0BKK9QLCUA%3A1791990645.267039 -->

--

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

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

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Andrei Borza <andrei.borza@sentry.io>
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.

Rename Workers AI Jev and Clef spans from evaluate to decide

2 participants