Uh oh!
There was an error while loading. Please reload this page.
ref(core): Unify .do* span ops to gen_ai.generate_content - #20074
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧Core
Other
🤖 This preview updates automatically when you update the PR. |
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
chargome
left a comment
There was a problem hiding this comment.
Might be worth calling out in the changelog in case someone depends on these span names.
| return GEN_AI_GENERATE_OBJECT_DO_GENERATE_OPERATION_ATTRIBUTE; | ||
| case 'ai.streamObject.doStream': | ||
| return GEN_AI_STREAM_OBJECT_DO_STREAM_OPERATION_ATTRIBUTE; | ||
| return 'gen_ai.generate_content'; |
There was a problem hiding this comment.
l: the other attributes are stored in a constant, maybe do the same here?
There was a problem hiding this comment.
Sure, I likely wanna get rid of the constants used here but I'll put one in for now to keep it consistent
Uh oh!
There was an error while loading. Please reload this page.
The Vercel AI integration had 4 distinct span op values for inner
.do*spans (gen_ai.generate_text,gen_ai.stream_text,gen_ai.generate_object,gen_ai.stream_object), even though all of them sharegenerate_contentas operation name. Every other AI integration derives the span op asgen_ai.${operationName}, so these should all begen_ai.generate_content.