Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions sentry_sdk/integrations/google_genai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,19 +442,14 @@ def set_span_data_for_request(span, integration, model, contents, kwargs):
if kwargs.get("stream", False):
span.set_data(SPANDATA.GEN_AI_RESPONSE_STREAMING, True)

config = kwargs.get("config")

if config is None:
return

config = cast(GenerateContentConfig, config)
config = kwargs.get("config") # type: Optional[GenerateContentConfig]

# Set input messages/prompts if PII is allowed
if should_send_default_pii() and integration.include_prompts:
messages = []

# Add system instruction if present
if hasattr(config, "system_instruction"):
if config and hasattr(config, "system_instruction"):
system_instruction = config.system_instruction
if system_instruction:
system_text = extract_contents_text(system_instruction)
Expand Down
Loading