File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -249,14 +249,13 @@ export function addVercelAiProcessors(client: Client): void {
249
249
}
250
250
251
251
/**
252
- * For the gen_ai.invoke_agent span, correctly iterate over child spans and aggregate:
253
- * - Input tokens from client LLM child spans that include this attribute.
254
- * - Output tokens from client LLM child spans that include this attribute.
255
- * - Total tokens from client LLM child spans that include this attribute.
252
+ * For the gen_ai.invoke_agent span, iterate over child spans and aggregate tokens :
253
+ * - Input tokens from client LLM child spans that include `gen_ai.usage.input_tokens` attribute.
254
+ * - Output tokens from client LLM child spans that include `gen_ai.usage.output_tokens` attribute.
255
+ * - Total tokens from client LLM child spans that include `gen_ai.usage.total_tokens` attribute.
256
256
*
257
- * Only immediate children of the invoke_agent span need to be considered,
257
+ * Only immediate children of the `gen_ai. invoke_agent` span need to be considered,
258
258
* since aggregation will automatically occur for each parent span.
259
- *
260
259
*/
261
260
function accumulateTokensFromChildSpans ( spanJSON : SpanJSON , allSpans : SpanJSON [ ] ) : void {
262
261
if ( spanJSON . op !== 'gen_ai.invoke_agent' ) {
You can’t perform that action at this time.
0 commit comments