npm install --save @arizeai/openinference-instrumentation-openai
To load the OpenAI instrumentation, specify it in the registerInstrumentations call along with any additional instrumentation you wish to enable.
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import {
OpenAIInstrumentation,
} from "@arizeai/openinference-instrumentation-openai";
import { registerInstrumentations } from "@opentelemetry/instrumentation";
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [new OpenAIInstrumentation()],
});