Unused import OpenAIIntegration on Pydantic AI integration page

Open Beginner friendly
#19,432 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
documentation

Research direction

Open the Pydantic AI integration page linked in the issue and locate its first two Python code snippets. Remove the unused OpenAIIntegration import from both snippets, then verify that the examples no longer require the openai package solely because of that import.

Written by the indexing model from the issue text.

Description

Docs Platform: Python SDKs
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.

Dominant language
MDX
Stars
446
Forks
1.7k
Avg merge
1d 21h
Merged PRs (30d)
312

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-docs

All issues in getsentry/sentry-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.