Skip to content

Commit 0776a7f

Browse files
committed
update span name
1 parent b769ed6 commit 0776a7f

File tree

1 file changed

+2
-2
lines changed
  • util/opentelemetry-util-genai/src/opentelemetry/util/genai

1 file changed

+2
-2
lines changed

util/opentelemetry-util-genai/src/opentelemetry/util/genai/generators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ def _span_for_invocation(self, invocation: LLMInvocation):
273273
The span is not ended automatically on exiting the context; callers
274274
must finalize via _finalize_invocation.
275275
"""
276-
system = invocation.attributes.get("system")
276+
request_model = invocation.attributes.get("request_model")
277277
span = self._start_span(
278-
name=f"{system}.chat",
278+
name=f"{GenAI.GenAiOperationNameValues.CHAT.value} {request_model}",
279279
kind=SpanKind.CLIENT,
280280
parent_run_id=invocation.parent_run_id,
281281
)

0 commit comments

Comments
 (0)