Skip to content

Commit 04dc92c

Browse files
.
1 parent 26b932b commit 04dc92c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

sentry_sdk/integrations/openai.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@ def _set_responses_api_input_data(
282282
explicit_instructions: "Union[Optional[str], Omit]" = kwargs.get("instructions")
283283
system_instructions = _get_system_instructions_responses(messages)
284284
if (
285-
(_is_given(explicit_instructions) or len(system_instructions) > 0)
285+
(
286+
(explicit_instructions is not None and _is_given(explicit_instructions))
287+
or len(system_instructions) > 0
288+
)
286289
and should_send_default_pii()
287290
and integration.include_prompts
288291
):
@@ -394,6 +397,9 @@ def _set_completions_api_input_data(
394397
span, SPANDATA.GEN_AI_REQUEST_MESSAGES, messages_data, unpack=False
395398
)
396399

400+
set_data_normalized(span, SPANDATA.GEN_AI_OPERATION_NAME, "chat")
401+
_commmon_set_input_data(span, kwargs)
402+
397403

398404
def _set_embeddings_input_data(
399405
span: "Span",

0 commit comments

Comments
 (0)