Skip to content

feat(server-utils)!: Clean up gen ai ops - #23076

Merged
msonnb merged 1 commit into
developfrom
ms/gen-ai-ops
Aug 6, 2026
Merged

feat(server-utils)!: Clean up gen ai ops#23076
msonnb merged 1 commit into
developfrom
ms/gen-ai-ops

Conversation

@msonnb

@msonnb msonnb commented Aug 6, 2026

Copy link
Copy Markdown
Member
  • Use gen_ai.chat and gen_ai.invoke_model instead of rpc for AWS Bedrock spans
  • Use function as a fallback op instead of gen_ai.unknown and ai.run
  • Use function instead of gen_ai.models for model metadata calls

part of #22446

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 30.12 kB - -
@sentry/browser - with treeshaking flags 28.32 kB - -
@sentry/browser (incl. Tracing) 47.53 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.54 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.29 kB - -
@sentry/browser (incl. Tracing, Replay) 86.91 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.33 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.6 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.25 kB - -
@sentry/browser (incl. Feedback) 47.45 kB - -
@sentry/browser (incl. sendFeedback) 34.96 kB - -
@sentry/browser (incl. FeedbackAsync) 40.1 kB - -
@sentry/browser (incl. Metrics) 31.2 kB - -
@sentry/browser (incl. Logs) 31.41 kB - -
@sentry/browser (incl. Metrics & Logs) 32.11 kB - -
@sentry/react 31.93 kB - -
@sentry/react (incl. Tracing) 49.79 kB - -
@sentry/vue 35.23 kB - -
@sentry/vue (incl. Tracing) 49.54 kB - -
@sentry/svelte 30.14 kB - -
CDN Bundle 32.13 kB - -
CDN Bundle (incl. Tracing) 47.81 kB - -
CDN Bundle (incl. Logs, Metrics) 33.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.19 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.02 kB - -
CDN Bundle (incl. Tracing, Replay) 85.45 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.27 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.59 kB - -
CDN Bundle - uncompressed 95.27 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.78 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.9 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.75 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.6 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.03 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.74 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.69 kB - -
@sentry/nextjs (client) 52.36 kB - -
@sentry/sveltekit (client) 47.98 kB - -
@sentry/core/server 65.56 kB - -
@sentry/core/browser 51.82 kB - -
@sentry/node 119.28 kB +0.05% +50 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.09 kB - -
@sentry/aws-serverless 92.61 kB +0.02% +11 B 🔺
@sentry/cloudflare (withSentry) - minified 212.55 kB -0.01% -6 B 🔽
@sentry/cloudflare (withSentry) 524.74 kB -0.01% -7 B 🔽

View base workflow run

@msonnb

msonnb commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

bugbot lauf

@msonnb
msonnb force-pushed the ms/gen-ai-ops branch 2 times, most recently from 9256efb to 531ee7b Compare August 6, 2026 11:56
@msonnb
msonnb marked this pull request as ready for review August 6, 2026 12:11
@msonnb
msonnb requested review from a team as code owners August 6, 2026 12:11
@msonnb
msonnb requested review from andreiborza, isaacs, mydea, nicohrubec and s1gr1d and removed request for a team, isaacs, mydea and s1gr1d August 6, 2026 12:11

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 531ee7b. Configure here.

*/
export function getGenAiSpanOp(operationName: string): string {
return NON_INFERENCE_OPERATIONS.has(operationName) ? GENERAL_FUNCTION_SPAN_OP : `gen_ai.${operationName}`;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing migration notes for span ops

Medium Severity

This ! breaking change renames many user-visible span ops (handlerrequest_handler.* / handler.nestjs, function → framework-specific ops, gen_ai.models / ai.runfunction, Bedrock rpcgen_ai.*, Hono internal http.serverhono.request, Hapi plugin handlerplugin.hapi) but does not update MIGRATION.md. That violates the Breaking Changes review rule: similar op renames are already documented there for dashboards, alerts, and ignoreSpans filters.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 531ee7b. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soon curslinger, soon

- Use `gen_ai.chat` / `gen_ai.generate_content` ops for AWS Bedrock
  Converse and InvokeModel spans instead of the generic `rpc` op, and set
  `gen_ai.operation.name` plus a gen_ai-style span name on both.
- Use `function` as a fallback op instead of `gen_ai.unknown` and `ai.run`.
- Use `function` instead of `gen_ai.models` for model metadata calls.

part of #22446

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@msonnb
msonnb enabled auto-merge (squash) August 6, 2026 12:55
@msonnb
msonnb merged commit 2708d08 into develop Aug 6, 2026
393 of 395 checks passed
@msonnb
msonnb deleted the ms/gen-ai-ops branch August 6, 2026 13:08
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