Skip to content

Conversation

@constantinius
Copy link
Contributor

@constantinius constantinius requested a review from a team as a code owner November 20, 2025 12:56
@linear
Copy link

linear bot commented Nov 20, 2025

@constantinius constantinius requested review from a team and vgrozdanic November 20, 2025 12:56
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 80.51948% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.96%. Comparing base (145773b) to head (3587c5e).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/google_genai/utils.py 66.66% 4 Missing and 7 partials ⚠️
sentry_sdk/integrations/google_genai/__init__.py 90.90% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5128      +/-   ##
==========================================
- Coverage   84.00%   83.96%   -0.05%     
==========================================
  Files         180      180              
  Lines       18081    18245     +164     
  Branches     3216     3243      +27     
==========================================
+ Hits        15189    15319     +130     
- Misses       1913     1929      +16     
- Partials      979      997      +18     
Files with missing lines Coverage Δ
sentry_sdk/integrations/google_genai/__init__.py 60.74% <90.90%> (+7.80%) ⬆️
sentry_sdk/integrations/google_genai/utils.py 67.96% <66.66%> (-0.16%) ⬇️

... and 4 files with indirect coverage changes

contents = kwargs.get("contents")
model_name = get_model_name(model)

return model_name, contents
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Positional arguments ignored in embed_content

The prepare_embed_content_args function accepts args but ignores them, only retrieving model and contents from kwargs. This causes missing span data (model name and input text) when embed_content is called with positional arguments, which is a supported usage pattern in the Google GenAI SDK.

Fix in Cursor Fix in Web

contents = kwargs.get("contents")
model_name = get_model_name(model)

return model_name, contents
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Positional arguments ignored in embed_content

The prepare_embed_content_args function ignores positional arguments in args, unlike prepare_generate_content_args. This results in missing model name and input data in spans when embed_content is called with positional arguments (e.g., embed_content(model, contents)), which is a supported usage pattern.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants