`add_attachment` needs to be called from the top level API from version 3.0 on

Open Beginner friendly
#13,592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Open the attachments page at https://docs.sentry.io/platforms/python/enriching-events/attachments/ and review the current add_attachment guidance. Update it to distinguish Python SDK versions below 3.0 from version 3.0 onward, including the documented top-level sentry_sdk.add_attachment() API. Done means the page clearly states which call location applies to each version.

Written by the indexing model from the issue text.

Description

Platform: Python SDKs
SDK

Python SDK

Description

The API add_attachment is documented to be called on the Scope. From version 3.0 of the Python SDK on it should always be called from the top level API sentry_sdk.add_attachment().

Suggested Solution

Update this page: https://docs.sentry.io/platforms/python/enriching-events/attachments/

In SDK <3.0 it can be called only from the Scope. (like described now. Maybe we also add the top level API in a minor, then both ways should be described)
In SDK >=3.0 it should be called only from the top level API sentry_sdk.add_attachment()

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.