-
Notifications
You must be signed in to change notification settings - Fork 572
chore(gen_ai): add auto-enablement for google genai #5295
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
chore(gen_ai): add auto-enablement for google genai #5295
Conversation
sentry_sdk/integrations/__init__.py
Outdated
|
|
||
| _INTEGRATION_DEACTIVATES = { | ||
| "langchain": {"openai", "anthropic"}, | ||
| "litellm": {"openai", "anthropic"}, |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
sentry_sdk/integrations/__init__.py
Outdated
|
|
||
| _INTEGRATION_DEACTIVATES = { | ||
| "langchain": {"openai", "anthropic"}, | ||
| "litellm": {"openai", "anthropic"}, |
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.
It would be nice to have tests for the new auto-deactivation.
Existing tests like this are in tests/test_ai_integration_deactivation.py.
|
@shellmayr can you investigate why the |
|
@alexander-alderman-webb yep - on it! |
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
@alexander-alderman-webb FYI @constantinius let me know that there are still some issues in our LiteLLM instrumentation that may make the experience worse than what we want, if we auto-enable, so I'm removing it from this PR for now |
The GoogleGenAI integration is auto-enabled but was not checking the minimum version (1.29.0) before attempting to patch methods. This could cause AttributeError crashes during Sentry initialization if a user has an older version of google-genai installed. Add _check_minimum_version call in setup_once() to ensure graceful handling of incompatible versions, matching the pattern used by other auto-enabled integrations like Anthropic. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
alexander-alderman-webb
left a comment
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.
Please also change the title now you're not auto-enabling litellm
|
Feel free to merge! |
Uh oh!
There was an error while loading. Please reload this page.