File tree Expand file tree Collapse file tree
sentry_sdk/integrations/google_genai
tests/integrations/google_genai Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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" ]]),
Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments