@@ -44,7 +44,7 @@ def somefunction(somearg):
4444 wrapped_somefunction = tools [0 ]
4545
4646 self .assertIsNone (self .otel .get_span_named ("tool_call somefunction" ))
47- wrapped_somefunction (somearg = "foo " )
47+ wrapped_somefunction (somearg = "someparam " )
4848 self .otel .assert_has_span_named ("tool_call somefunction" )
4949 generated_span = self .otel .get_span_named ("tool_call somefunction" )
5050 self .assertEqual (
@@ -75,7 +75,7 @@ def somefunction(somearg):
7575 wrapped_somefunction = tools [0 ]
7676
7777 self .assertIsNone (self .otel .get_span_named ("tool_call somefunction" ))
78- wrapped_somefunction (somearg = "foo " )
78+ wrapped_somefunction (somearg = "someparam " )
7979 self .otel .assert_has_span_named ("tool_call somefunction" )
8080 generated_span = self .otel .get_span_named ("tool_call somefunction" )
8181 self .assertEqual (
@@ -92,8 +92,8 @@ def handle(*args, **kwargs):
9292 calls .append ((args , kwargs ))
9393 return "some result"
9494
95- def somefunction (foo , bar = 2 ):
96- print ("foo =%s, bar =%s" , foo , bar )
95+ def somefunction (someparam , otherparam = 2 ):
96+ print ("someparam =%s, otherparam =%s" , someparam , otherparam )
9797
9898 self .mock_generate_content .side_effect = handle
9999 self .client .models .generate_content (
@@ -107,14 +107,14 @@ def somefunction(foo, bar=2):
107107 config = calls [0 ][1 ]["config" ]
108108 tools = config .tools
109109 wrapped_somefunction = tools [0 ]
110- wrapped_somefunction (123 , bar = "abc" )
110+ wrapped_somefunction (123 , otherparam = "abc" )
111111 self .otel .assert_has_span_named ("tool_call somefunction" )
112112 generated_span = self .otel .get_span_named ("tool_call somefunction" )
113113 self .assertEqual (
114- generated_span .attributes ["code.function.params.foo " ], "123"
114+ generated_span .attributes ["code.function.params.someparam " ], "123"
115115 )
116116 self .assertEqual (
117- generated_span .attributes ["code.function.params.bar " ], "'abc'"
117+ generated_span .attributes ["code.function.params.otherparam " ], "'abc'"
118118 )
119119
120120 def test_tool_calls_do_not_record_parameter_values_if_not_enabled (self ):
@@ -127,8 +127,8 @@ def handle(*args, **kwargs):
127127 calls .append ((args , kwargs ))
128128 return "some result"
129129
130- def somefunction (foo , bar = 2 ):
131- print ("foo =%s, bar =%s" , foo , bar )
130+ def somefunction (someparam , otherparam = 2 ):
131+ print ("someparam =%s, otherparam =%s" , someparam , otherparam )
132132
133133 self .mock_generate_content .side_effect = handle
134134 self .client .models .generate_content (
@@ -142,11 +142,11 @@ def somefunction(foo, bar=2):
142142 config = calls [0 ][1 ]["config" ]
143143 tools = config .tools
144144 wrapped_somefunction = tools [0 ]
145- wrapped_somefunction (123 , bar = "abc" )
145+ wrapped_somefunction (123 , otherparam = "abc" )
146146 self .otel .assert_has_span_named ("tool_call somefunction" )
147147 generated_span = self .otel .get_span_named ("tool_call somefunction" )
148- self .assertNotIn ("code.function.params.foo " , generated_span .attributes )
149- self .assertNotIn ("code.function.params.bar " , generated_span .attributes )
148+ self .assertNotIn ("code.function.params.someparam " , generated_span .attributes )
149+ self .assertNotIn ("code.function.params.otherparam " , generated_span .attributes )
150150
151151 def test_tool_calls_record_return_values_on_span_if_enabled (self ):
152152 os .environ ["OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT" ] = (
0 commit comments