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 {
249249}
250250
251251/**
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.
256256 *
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,
258258 * since aggregation will automatically occur for each parent span.
259- *
260259 */
261260function accumulateTokensFromChildSpans ( spanJSON : SpanJSON , allSpans : SpanJSON [ ] ) : void {
262261 if ( spanJSON . op !== 'gen_ai.invoke_agent' ) {
You can’t perform that action at this time.
0 commit comments