Commit 04ecbc3
authored
feat(node): Update vercel ai integration attributes (#16721)
Make changes to the Vercel AI integration as per
https://www.notion.so/sentry/Agent-Monitoring-SDK-differences-21c8b10e4b5d80bcab51f72ae1418ea8
AI summary:
### Key Improvements:
1. **Eliminated duplicate attributes** - Tool call and prompt attributes
are now renamed instead of duplicated
2. **Added tool input/output support** - New `gen_ai.tool.input` and
`gen_ai.tool.output` attributes
3. **Auto-sets tool type** - Automatically adds `gen_ai.tool.type:
'function'` for tool calls
4. **Better OpenTelemetry compliance** - Cleaner attribute mapping
following semantic conventions
### Technical Changes:
- Uses `renameAttributeKey()` consistently instead of duplicating
attributes
- Removes old `ai.*` attributes after creating new `gen_ai.*` ones1 parent 86d8994 commit 04ecbc3
File tree
2 files changed
+20
-10
lines changed- dev-packages/node-integration-tests/suites/tracing/vercelai
- packages/core/src/utils
2 files changed
+20
-10
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | 185 | | |
188 | 186 | | |
| 187 | + | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
| |||
389 | 388 | | |
390 | 389 | | |
391 | 390 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | 391 | | |
397 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
398 | 396 | | |
399 | 397 | | |
400 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
117 | 129 | | |
118 | 130 | | |
119 | 131 | | |
| |||
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
130 | | - | |
| 142 | + | |
131 | 143 | | |
132 | 144 | | |
133 | 145 | | |
| |||
0 commit comments