Repository navigation
feat(server-utils): Record Workers AI Clairic calls as gen_ai.extract spans - #25624
Conversation
size-limit report 📦Compared: 7e8d5ef (PR test merge using develop at 8042719) Against: 8042719 (develop) · base run #63102 ✅ Baseline matches: this diff contains only this PR's changes.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be57c5c. Configure here.
4060a7a to
be57c5c
Compare
| */ | ||
| const EXTRACT_MODEL_PREFIXES = ['@cf/cloudflare/clairic']; | ||
|
|
||
| const BLOB_SUBSTITUTE = '[Blob substitute]'; |
There was a problem hiding this comment.
hmm is this a pattern we already have? 😅 why not just e.g. [BLOB] or something like this?
There was a problem hiding this comment.
It's written like that in https://develop.sentry.dev/sdk/telemetry/traces/modules/ai-agents/#tool-data
Binary blobs in the input list should be replaced with the string "[Blob substitute]" in positions where binary data is expected in a given schema. Only binary blobs in positions where binary data is explicitly expected must be redacted. For example, in OpenAI Completions schema, only binary blobs in content blocks with type image_url, input_audio or file should be redacted.
We don't adhere to this yet everywhere. Needs to be a cleanup over all our integrations at some point, probably for v12.
mydea
left a comment
There was a problem hiding this comment.
small note on the blob substitute, but otherwise LGTM
9397dde to
d06790c
Compare
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 failing, 58 successful. See the run.
Successful checks
|
… spans Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d06790c to
d84d8cd
Compare

What
Workers AI calls to Cloudflare Clairic (
@cf/cloudflare/clairic) now createextract <model>spans with opgen_ai.extract, instead ofchatspans without messages.[Blob substitute]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