File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
util/opentelemetry-util-genai/src/opentelemetry/util/genai Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515from dataclasses import asdict
16- from typing import Any , Dict , List
16+ from typing import List
1717
1818from opentelemetry .semconv ._incubating .attributes import (
1919 gen_ai_attributes as GenAI ,
@@ -106,21 +106,13 @@ def _maybe_set_span_messages(
106106 )
107107
108108
109- def _set_span_extra_attributes (
110- span : Span ,
111- attributes : Dict [str , Any ],
112- ) -> None :
113- for key , value in attributes .items ():
114- span .set_attribute (key , value )
115-
116-
117109def _apply_finish_attributes (span : Span , invocation : LLMInvocation ) -> None :
118110 """Apply attributes/messages common to finish() paths."""
119111 _apply_common_span_attributes (span , invocation )
120112 _maybe_set_span_messages (
121113 span , invocation .input_messages , invocation .output_messages
122114 )
123- _set_span_extra_attributes ( span , invocation .attributes )
115+ span . set_attributes ( invocation .attributes )
124116
125117
126118def _apply_error_attributes (span : Span , error : Error ) -> None :
You can’t perform that action at this time.
0 commit comments