Skip to content

Commit f2edb38

Browse files
committed
Fixed span names to be otel compatible
1 parent f0b3d95 commit f2edb38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry_sdk/integrations/openai.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def _new_chat_completion_common(f, *args, **kwargs):
180180

181181
span = sentry_sdk.start_span(
182182
op=consts.OP.GEN_AI_CHAT,
183-
name=f"{consts.OP.GEN_AI_CHAT} {model}",
183+
name=f"chat {model}",
184184
origin=OpenAIIntegration.origin,
185185
)
186186
span.__enter__()
@@ -365,7 +365,7 @@ def _new_embeddings_create_common(f, *args, **kwargs):
365365

366366
with sentry_sdk.start_span(
367367
op=consts.OP.GEN_AI_EMBEDDINGS,
368-
name=f"{consts.OP.GEN_AI_EMBEDDINGS} {model}",
368+
name=f"embeddings {model}",
369369
origin=OpenAIIntegration.origin,
370370
) as span:
371371
set_data_normalized(span, SPANDATA.GEN_AI_REQUEST_MODEL, model)
@@ -491,7 +491,7 @@ def _new_responses_create_common(f, *args, **kwargs):
491491

492492
span = sentry_sdk.start_span(
493493
op=consts.OP.GEN_AI_RESPONSES,
494-
name=f"{consts.OP.GEN_AI_RESPONSES} {model}",
494+
name=f"responses {model}",
495495
origin=OpenAIIntegration.origin,
496496
)
497497
span.__enter__()

0 commit comments

Comments
 (0)