From 56d96f13a355324e0823b0ded8dfd64c3d6b25db Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Tue, 21 Apr 2026 08:26:42 +0200 Subject: [PATCH] ref(google-genai): Revert input truncation --- sentry_sdk/integrations/google_genai/utils.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sentry_sdk/integrations/google_genai/utils.py b/sentry_sdk/integrations/google_genai/utils.py index 30b5d0e7a1..961a1ab9d6 100644 --- a/sentry_sdk/integrations/google_genai/utils.py +++ b/sentry_sdk/integrations/google_genai/utils.py @@ -17,8 +17,6 @@ import sentry_sdk from sentry_sdk.ai.utils import ( set_data_normalized, - truncate_and_annotate_messages, - normalize_message_roles, ) from sentry_sdk.consts import OP, SPANDATA from sentry_sdk.scope import should_send_default_pii @@ -534,18 +532,12 @@ def set_span_data_for_request( messages.append({"role": "user", "content": contents_text}) if messages: - normalized_messages = normalize_message_roles(messages) - scope = sentry_sdk.get_current_scope() - messages_data = truncate_and_annotate_messages( - normalized_messages, span, scope + set_data_normalized( + span, + SPANDATA.GEN_AI_REQUEST_MESSAGES, + messages, + unpack=False, ) - if messages_data is not None: - set_data_normalized( - span, - SPANDATA.GEN_AI_REQUEST_MESSAGES, - messages_data, - unpack=False, - ) # Extract parameters directly from config (not nested under generation_config) for param, span_key in [