Skip to content

Commit 18cb58d

Browse files
committed
update copy
1 parent e5b43cf commit 18cb58d

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
@@ -140,37 +140,9 @@ The integration will automatically detect streaming vs non-streaming requests an
140140

141141
<PlatformSection supported={['javascript.nextjs']}>
142142

143-
## Node.js Runtime
143+
## Node.js and Edge Runtime
144144

145-
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.
146-
147-
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:
148-
149-
```javascript
150-
module.exports = {
151-
webpack(config, { isServer }) {
152-
if (isServer) {
153-
// Force 'openai' to be required dynamically (not bundled)
154-
// This allows Sentry to instrument the OpenAI SDK at runtime
155-
config.externals = config.externals || [];
156-
config.externals.push("openai");
157-
}
158-
return config;
159-
},
160-
};
161-
```
162-
163-
This ensures the package is externalized at runtime.
164-
165-
<Alert>
166-
167-
Note that this cannot be achieved using `serverExternalPackages: ['openai']`.
168-
169-
</Alert>
170-
171-
## Edge Runtime
172-
173-
For Next.js applications using the Edge runtime, you need to manually instrument the OpenAI client:
145+
For Next.js applications, you need to manually instrument the OpenAI client:
174146

175147
```javascript
176148
import * as Sentry from "@sentry/nextjs";

0 commit comments

Comments
 (0)