-
Notifications
You must be signed in to change notification settings - Fork 578
feat(gen_ai): add function set_conversation_id and managing functions on the Scope and apply it on the Span on .finish()
#5362
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: master
Are you sure you want to change the base?
Conversation
…ns on the Scope and apply it on the Span on `.finish()`
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
…same logic as in Relay
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.
| Set the conversation_id in the scope. | ||
| """ | ||
| scope = sentry_sdk.get_current_scope() | ||
| scope.set_conversation_id(conversation_id) |
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.
Unused function added to codebase
Low Severity
The set_conversation_id function is defined but never imported or used anywhere in the codebase. A grep for this function shows it's only defined here and referenced in tests that use scope.set_conversation_id() directly instead. This function is not exported from the main sentry_sdk module and not imported by any integrations, making it dead code.
Issues
Closes https://linear.app/getsentry/issue/TET-1736/python-sdk-add-gen-aiconversationid-to-the-integrations-where-it-is