Skip to content

Commit cf73bfe

Browse files
chore(google-genai): Remove include_prompts parameter
1 parent 27e0e78 commit cf73bfe

4 files changed

Lines changed: 46 additions & 108 deletions

File tree

‎sentry_sdk/integrations/google_genai/__init__.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ class GoogleGenAIIntegration(Integration):
4040
identifier = IDENTIFIER
4141
origin = ORIGIN
4242

43-
def __init__(self: "GoogleGenAIIntegration", include_prompts: bool = True) -> None:
44-
self.include_prompts = include_prompts
45-
4643
@staticmethod
4744
def setup_once() -> None:
4845
version = parse_version(GOOGLE_GENAI_VERSION)

‎sentry_sdk/integrations/google_genai/streaming.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def set_span_data_for_streaming_response(
175175
safe_serialize([accumulated_response["text"]]),
176176
)
177177

178-
elif should_send_default_pii() and integration.include_prompts:
178+
elif should_send_default_pii():
179179
span.set_attribute(
180180
SPANDATA.GEN_AI_RESPONSE_TEXT,
181181
safe_serialize([accumulated_response["text"]]),

‎sentry_sdk/integrations/google_genai/utils.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ def set_span_data_for_request(
940940
if has_data_collection_enabled(client.options):
941941
if client.options["data_collection"]["gen_ai"]["inputs"]:
942942
record_inputs = True
943-
elif should_send_default_pii() and integration.include_prompts:
943+
elif should_send_default_pii():
944944
record_inputs = True
945945

946946
if record_inputs:
@@ -1061,7 +1061,7 @@ def set_span_data_for_response(
10611061
span.set_attribute(
10621062
SPANDATA.GEN_AI_RESPONSE_TEXT, safe_serialize(response_texts)
10631063
)
1064-
elif should_send_default_pii() and integration.include_prompts:
1064+
elif should_send_default_pii():
10651065
# TODO: Delete this block once data collection has been completely rolled out
10661066
response_texts = _extract_response_text(response)
10671067
if response_texts:
@@ -1115,7 +1115,7 @@ def set_span_data_for_embed_request(
11151115
if has_data_collection_enabled(client.options):
11161116
if client.options["data_collection"]["gen_ai"]["inputs"]:
11171117
record_inputs = True
1118-
elif should_send_default_pii() and integration.include_prompts:
1118+
elif should_send_default_pii():
11191119
record_inputs = True
11201120

11211121
if record_inputs:

0 commit comments

Comments
 (0)