Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 0 additions & 3 deletions sentry_sdk/integrations/google_genai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ class GoogleGenAIIntegration(Integration):
identifier = IDENTIFIER
origin = ORIGIN

def __init__(self: "GoogleGenAIIntegration", include_prompts: bool = True) -> None:
self.include_prompts = include_prompts

@staticmethod
def setup_once() -> None:
version = parse_version(GOOGLE_GENAI_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/google_genai/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def set_span_data_for_streaming_response(
safe_serialize([accumulated_response["text"]]),
)

elif should_send_default_pii() and integration.include_prompts:
elif should_send_default_pii():
span.set_attribute(
SPANDATA.GEN_AI_RESPONSE_TEXT,
safe_serialize([accumulated_response["text"]]),
Expand Down
6 changes: 3 additions & 3 deletions sentry_sdk/integrations/google_genai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def set_span_data_for_request(
if has_data_collection_enabled(client.options):
if client.options["data_collection"]["gen_ai"]["inputs"]:
record_inputs = True
elif should_send_default_pii() and integration.include_prompts:
elif should_send_default_pii():
record_inputs = True

if record_inputs:
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def set_span_data_for_response(
span.set_attribute(
SPANDATA.GEN_AI_RESPONSE_TEXT, safe_serialize(response_texts)
)
elif should_send_default_pii() and integration.include_prompts:
elif should_send_default_pii():
# TODO: Delete this block once data collection has been completely rolled out
response_texts = _extract_response_text(response)
if response_texts:
Expand Down Expand Up @@ -1115,7 +1115,7 @@ def set_span_data_for_embed_request(
if has_data_collection_enabled(client.options):
if client.options["data_collection"]["gen_ai"]["inputs"]:
record_inputs = True
elif should_send_default_pii() and integration.include_prompts:
elif should_send_default_pii():
record_inputs = True

if record_inputs:
Expand Down
Loading
Loading