Skip to content

Unused import OpenAIIntegration on Pydantic AI integration page #19432

Description

@ivanipenburg

SDK

Python SDK

Description

In the two code examples on the Pydantic AI integration page, the first two Python code snippets include the following import:

from sentry_sdk.integrations.openai import OpenAIIntegration

This import is however not used in the further code and has no intended side-effects that are needed for proper tracing. It does however give an error if the openai package is not installed, which is not correct.

I think this is a leftover from an older workaround, which was removed here: https://github.com/getsentry/sentry-docs/pull/15675/changes#diff-c4cf302beb9756f2cc64183534fbdef108dfe4fa330612789205c5340bb16dee

Suggested Solution

Remove the following line from both snippets on this page:

from sentry_sdk.integrations.openai import OpenAIIntegration

I can create a PR to do this if you want.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions