Commit 493b301
fix(core): Use
Vercel AI SDK V6 appends `functionId` to the `operation.name` span
attribute (e.g., `ai.streamText myAgent`), causing
`mapVercelAiOperationName` to miss the exact-match lookup and leave
`gen_ai.operation.name` unmapped. This fix uses the `ai.operationId`
attribute (which always contains the bare operation like
`ai.streamText`) when present, falling back to `operation.name` for
older Vercel SDK versions. The existing `ToolLoopAgent` integration test
is strengthened with a functionId to prevent regression.
Closes #20284ai.operationId for Vercel AI V6 operation name mapping (#20285)1 parent 33f8506 commit 493b301
File tree
3 files changed
+11
-2
lines changed- dev-packages/node-integration-tests/suites/tracing/vercelai/v6
- packages/core/src/tracing/vercel-ai
3 files changed
+11
-2
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| |||
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
| 637 | + | |
636 | 638 | | |
637 | 639 | | |
638 | 640 | | |
| |||
662 | 664 | | |
663 | 665 | | |
664 | 666 | | |
| 667 | + | |
665 | 668 | | |
666 | 669 | | |
667 | 670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
326 | 332 | | |
327 | 333 | | |
328 | 334 | | |
| |||
0 commit comments