Skip to content

Commit ea8e51f

Browse files
authored
fix(google-genai): deactivate google genai when langchain is used (#5389)
- we are seeing duplicate spans for google genai and langchain - deactivate google genai when langchain is used
1 parent ae8f065 commit ea8e51f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sentry_sdk/integrations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def iter_default_integrations(
167167

168168

169169
_INTEGRATION_DEACTIVATES = {
170-
"langchain": {"openai", "anthropic"},
170+
"langchain": {"openai", "anthropic", "google_genai"},
171171
"openai_agents": {"openai"},
172172
"pydantic_ai": {"openai", "anthropic"},
173173
}

tests/test_ai_integration_deactivation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_integration_deactivates_map_exists():
5757
assert "langchain" in _INTEGRATION_DEACTIVATES
5858
assert "openai" in _INTEGRATION_DEACTIVATES["langchain"]
5959
assert "anthropic" in _INTEGRATION_DEACTIVATES["langchain"]
60+
assert "google_genai" in _INTEGRATION_DEACTIVATES["langchain"]
6061
assert "openai_agents" in _INTEGRATION_DEACTIVATES
6162
assert "openai" in _INTEGRATION_DEACTIVATES["openai_agents"]
6263
assert "pydantic_ai" in _INTEGRATION_DEACTIVATES

0 commit comments

Comments
 (0)