Skip to content

Event processor migration: Vercel AI event processor #20377

@Lms24

Description

@Lms24

core/src/tracing/vercel-ai/index.ts

Another tough one: The vercel AI event processor does a lot of post processing:

  • setting/removing attributes on a single ended span (processEndedVercelAiSpan, applyToolDescriptionsAndTokens) should be easy to port to client.processSpan
  • We accumulate token usage data on parent spans (accumulateTokensForParent, applyAccumulatedTokens). This can become more dangerous because to guarantee continued correctness, we need a guarantee that the child spans end before their parent so that we can accumulate at end time. This might need careful investigation if its the case. Otherwise we loose accuracy.

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions