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.
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 <noreply@anthropic.com>
alexander-alderman-webb
left a comment
There was a problem hiding this comment.
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.