File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -106,14 +106,14 @@ def record_token_usage(
106106 if ai_pipeline_name :
107107 span .set_attribute ("ai.pipeline.name" , ai_pipeline_name )
108108 if prompt_tokens is not None :
109- span .set_attribute ("ai.prompt_tokens_used " , prompt_tokens )
109+ span .set_attribute ("ai.prompt_tokens.used " , prompt_tokens )
110110 if completion_tokens is not None :
111- span .set_attribute ("ai.completion_tokens_used " , completion_tokens )
111+ span .set_attribute ("ai.completion_tokens.used " , completion_tokens )
112112 if (
113113 total_tokens is None
114114 and prompt_tokens is not None
115115 and completion_tokens is not None
116116 ):
117117 total_tokens = prompt_tokens + completion_tokens
118118 if total_tokens is not None :
119- span .set_attribute ("ai.total_tokens_used " , total_tokens )
119+ span .set_attribute ("ai.total_tokens.used " , total_tokens )
You can’t perform that action at this time.
0 commit comments