Skip to content
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

How to disable OpenAI tracing? #4574

Open
nikhilro opened this issue Aug 6, 2024 · 2 comments
Open

How to disable OpenAI tracing? #4574

nikhilro opened this issue Aug 6, 2024 · 2 comments
Labels
bug Something isn't working integration-openai

Comments

@nikhilro
Copy link

nikhilro commented Aug 6, 2024

I'm getting this random error:

"message": "Cannot read properties of undefined (reading 'message')",
"stack": "TypeError: Cannot read properties of undefined (reading 'message')\n at countCompletionTokens (/datadog-lib/node_modules/dd-trace/packages/datadog-plugin-openai/src/index.js:369:30)\n at usageExtraction (/datadog-lib/node_modules/dd-trace/packages/datadog-plugin-openai/src/index.js:759:35)\n at commonCreateResponseExtraction (/datadog-lib/node_modules/dd-trace/packages/datadog-plugin-openai/src/index.js:698:3)\n at responseDataExtractionByMethod (/datadog-lib/node_modules/dd-trace/packages/datadog-plugin-openai/src/index.js:461:7)\n at OpenApiPlugin.finish (/datadog-lib/node_modules/dd-trace/packages/datadog-plugin-openai/src/index.js:242:5)\n at /datadog-lib/node_modules/dd-trace/packages/dd-trace/src/plugins/tracing.js:76:22\n at Subscription._handler (/datadog-lib/node_modules/dd-trace/packages/dd-trace/src/plugins/plugin.js:14:9)\n at Channel.publish (node:diagnostics_channel:143:9)\n at finish (/datadog-lib/node_modules/dd-trace/packages/datadog-instrumentations/src/openai.js:365:12)\n at /datadog-lib/node_modules/dd-trace/packages/datadog-instrumentations/src/openai.js:256:15"

I don't want OpenAI tracing. Please let me know how to disable.

@juan-fernandez
Copy link
Collaborator

hey @nikhilro !

You should be able to disable the plugin altogether with this env var:

DD_TRACE_DISABLED_PLUGINS=openai
DD_TRACE_DISABLED_INSTRUMENTATIONS=openai

Let us know if this solves your issue.

Also: could you give us any more info about how to reproduce this issue? So we can solve it for good 😄

@juan-fernandez juan-fernandez added bug Something isn't working integration-openai labels Aug 6, 2024
@nikhilro
Copy link
Author

nikhilro commented Aug 6, 2024

Thanks!

No clue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integration-openai
Projects
None yet
Development

No branches or pull requests

2 participants