[FEATURE]: LLMObs - Instrumentation for `ai-sdk`
Package Name
ai
Package Version(s)
4.1.50
Describe the feature you'd like
In the js/ts ecosystem, Vercels ai-sdk is quickly becoming the go-to LLM SDK over langchain. It's got a very good API, and even supports OTel and custom instrumentation. Would love an integration into Datadog LLMObs!
Is your feature request related to a problem?
No response
Describe alternatives you've considered
Just using OTel to send to Datadog APM.
Additional context
No response
Hi @ianwoodfill! This one is definitely on our radar. I'll keep you updated here on any decisions/progress we make with regards to LLM Observability + Vercel's AI SDK!
Hi @ianwoodfill,
This issue may be dated for you, but for anyone still looking for an answer I’ve put together a working example that connects the Vercel AI SDK to Datadog LLM Observability via OpenTelemetry:
Gist → https://gist.github.com/nt9142/403e78159999b8f1d0e79327e39c1989
It:
- boots the Datadog tracer with
llmobsenabled, - bridges the AI SDK’s
experimental_telemetryhooks to OpenTelemetry spans, - ships prompts, responses, and model metadata straight to Datadog.
Hope this saves you some time!
hey folks! i followed up in the linked PR, but we released auto-instrumentation support for the Vercel AI SDK in [email protected] - feel free to give it a try and follow up with any issues (preferably in a separate issue, or DD support ticket) 😄