Skip to content

Commit c84c532

Browse files
committed
Remove unnecessary dict.get() calls
1 parent fb0b4ae commit c84c532

File tree

1 file changed

+2
-2
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-vertexai/src/opentelemetry/instrumentation/vertexai

1 file changed

+2
-2
lines changed

instrumentation-genai/opentelemetry-instrumentation-vertexai/src/opentelemetry/instrumentation/vertexai/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,6 @@ def is_content_enabled() -> bool:
119119

120120

121121
def get_span_name(span_attributes: Mapping[str, AttributeValue]):
122-
name = span_attributes.get(GenAIAttributes.GEN_AI_OPERATION_NAME, "")
123-
model = span_attributes.get(GenAIAttributes.GEN_AI_REQUEST_MODEL, "")
122+
name = span_attributes[GenAIAttributes.GEN_AI_OPERATION_NAME]
123+
model = span_attributes[GenAIAttributes.GEN_AI_REQUEST_MODEL]
124124
return f"{name} {model}"

0 commit comments

Comments
 (0)