-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ref(docs): Restructure OpenAI integration documentation #16044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| ## Configuration | ||
|
|
||
| By default this integration adds tracing support to OpenAI API method calls including: | ||
| By default, tracing support is added to the following OpenAI API method calls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated this to be abstract as it can either be an integration or helper
| This integration is **enabled by default for Node.js-based platforms** and automatically captures spans for OpenAI API method calls. You don't need to add it to your `integrations` array in `Sentry.init` unless you want to configure input and output recording with the `recordInputs` and `recordOutputs` options: | ||
|
|
||
| ```javascript | ||
| Sentry.init({ | ||
| dsn: "____PUBLIC_DSN____", | ||
| tracesSampleRate: 1.0, | ||
| integrations: [ | ||
| // This integration is enabled by default. | ||
| // Only add this if you want to configure options. | ||
| Sentry.openAIIntegration({ | ||
| recordInputs: true, | ||
| recordOutputs: true, | ||
| }), | ||
| ], | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this integration is enabled by default, we should give that instruction at the base level, and only give the instructions for options under the subheading. This paragraph also doesn't really tell me what "configuring input and output recording" does for me, so it feels a bit vague right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@RulaKhaled I noticed that we do not have a separate section about Runtime for NextJS + OpenAI. should we add something? https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/openai/ |

closes https://linear.app/getsentry/issue/TET-1719/browser-javascript-ai-agent-onboarding