Skip to content

Commit 701adb0

Browse files
committed
update copy
1 parent dd867e0 commit 701adb0

File tree

1 file changed

+2
-30
lines changed
  • docs/platforms/javascript/common/configuration/integrations

1 file changed

+2
-30
lines changed

docs/platforms/javascript/common/configuration/integrations/openai.mdx

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -117,37 +117,9 @@ The integration will automatically detect streaming vs non-streaming requests an
117117

118118
<PlatformSection supported={['javascript.nextjs']}>
119119

120-
## Node.js Runtime
120+
## Node.js and Edge Runtime
121121

122-
Automatic instrumentation of the OpenAI SDK may not work as expected with certain Next.js configurations (especially with Turbopack and in Next.js 16). In these cases, manual instrumentation via `instrumentOpenAiClient` is recommended.
123-
124-
For projects using Next.js 15 or earlier with Webpack, the following configuration can be applied in your `next.config.js` to ensure proper instrumentation:
125-
126-
```javascript
127-
module.exports = {
128-
webpack(config, { isServer }) {
129-
if (isServer) {
130-
// Force 'openai' to be required dynamically (not bundled)
131-
// This allows Sentry to instrument the OpenAI SDK at runtime
132-
config.externals = config.externals || [];
133-
config.externals.push("openai");
134-
}
135-
return config;
136-
},
137-
};
138-
```
139-
140-
This ensures the package is externalized at runtime.
141-
142-
<Alert>
143-
144-
Note that this cannot be achieved using `serverExternalPackages: ['openai']`.
145-
146-
</Alert>
147-
148-
## Edge Runtime
149-
150-
For Next.js applications using the Edge runtime, you need to manually instrument the OpenAI client:
122+
For Next.js applications, you need to manually instrument the OpenAI client:
151123

152124
```javascript
153125
import * as Sentry from "@sentry/nextjs";

0 commit comments

Comments
 (0)