Skip to content

Commit 3af88c2

Browse files
authored
Update instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/tool_call_wrapper.py
1 parent 15fad8a commit 3af88c2

File tree

1 file changed

+1
-5
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai

1 file changed

+1
-5
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/tool_call_wrapper.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@
3535

3636

3737
def _is_primitive(value):
38-
primitive_types = [str, int, bool, float]
39-
for ptype in primitive_types:
40-
if isinstance(value, ptype):
41-
return True
42-
return False
38+
return isinstance(value, (str, int, bool, float))
4339

4440

4541
def _to_otel_value(python_value):

0 commit comments

Comments
 (0)