Skip to content

Commit eb9748b

Browse files
ref(huggingface-hub): Remove set_data_normalized for the gen_ai.response.finish_reasons attribute
1 parent 963b4dd commit eb9748b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sentry_sdk/integrations/huggingface_hub.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ def new_huggingface_task(*args: "Any", **kwargs: "Any") -> "Any":
184184
span.set_data(SPANDATA.GEN_AI_RESPONSE_MODEL, response_model)
185185

186186
if finish_reason is not None:
187-
set_data_normalized(
188-
span,
187+
span.set_data(
189188
SPANDATA.GEN_AI_RESPONSE_FINISH_REASONS,
190189
finish_reason,
191190
)
@@ -258,8 +257,7 @@ def new_details_iterator() -> "Iterable[Any]":
258257
yield chunk
259258

260259
if finish_reason is not None:
261-
set_data_normalized(
262-
span,
260+
span.set_data(
263261
SPANDATA.GEN_AI_RESPONSE_FINISH_REASONS,
264262
finish_reason,
265263
)
@@ -337,8 +335,7 @@ def new_iterator() -> "Iterable[str]":
337335
)
338336

339337
if finish_reason is not None:
340-
set_data_normalized(
341-
span,
338+
span.set_data(
342339
SPANDATA.GEN_AI_RESPONSE_FINISH_REASONS,
343340
finish_reason,
344341
)

0 commit comments

Comments
 (0)