-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(Core): Report well known values in gen_ai.operation.name attribute #18925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
fix(Core): Report well known values in gen_ai.operation.name attribute #18925
Conversation
There was a problem hiding this comment.
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.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| if (attributes[OPERATION_NAME_ATTRIBUTE]) { | ||
| const operationName = mapVercelAiOperationName(attributes[OPERATION_NAME_ATTRIBUTE] as string); | ||
| attributes[GEN_AI_OPERATION_NAME_ATTRIBUTE] = operationName; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original attribute not deleted after mapping operation name
Low Severity
The new code for mapping OPERATION_NAME_ATTRIBUTE to GEN_AI_OPERATION_NAME_ATTRIBUTE sets the new attribute with the mapped value but does not delete the original operation.name attribute. This is inconsistent with all other attribute processing in processEndedVercelAiSpan, which uses renameAttributeKey to delete the old key after copying. The comment says "Rename AI SDK attributes" but the implementation only adds without deleting, leaving stale operation.name values (e.g., 'ai.generateText') on spans alongside the new gen_ai.operation.name values (e.g., 'generate_content').
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
AI integrations should follow OTel spec and report the gen_ai.operation.name with the values listed in sentry conventions if applies getsentry/sentry-conventions#225
Closes https://linear.app/getsentry/issue/JS-1527/report-well-known-values-in-gen-aioperationname-attribute