-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
When setting up an OpenAI client according to their documentation, Sentry does not instrument the ai calls.
// does not work - no Sentry ai spans recording
import OpenAI from "openai";
// works
import { OpenAI } from "openai";
const client = new OpenAI();
const response = await client.responses.create({
model: "gpt-4.1",
input: "Write a one-sentence bedtime story about a unicorn."
});
Tested this in an ESM based app with openai v4.104.0 and @sentry/node 10.0.0.
Rola: This happens only for default exports, we need to point the default export to the newly wrapped function.
Metadata
Metadata
Assignees
Labels
Projects
Status
No status