Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getsentry/sentry-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: getsentry/sentry-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 52 files changed
  • 5 contributors

Commits on Mar 12, 2026

  1. ci(docs): Add agentic workflows for codebase documentation (#5649)

    ## Summary
    
    - Add two GitHub Agentic Workflows (`gh aw`) that auto-generate and
    maintain developer-facing codebase documentation in `docs/codebase/`
    - **`docs-codebase-refresh`**: full regeneration of every doc page,
    triggered on merge to main/master or manual dispatch
    - **`docs-codebase-update`**: incremental update of only affected pages,
    triggered on merge when `sentry_sdk/**`, `MIGRATION_GUIDE.md`, or
    `CHANGELOG.md` change
    - Both workflows create PRs (never direct commits) for human review
    - Includes a portable `BUILD_PLAN.md` designed for reuse across other
    Sentry SDKs -- only the SDK Context block changes per language (will
    remove later)
    
    ### How This Relates to Other Sentry Docs
    
    - **[docs.sentry.io/platforms/\*](https://docs.sentry.io/)** tells users
    *what to do* -- setup guides, config options, API usage.
    - **[develop.sentry.dev/sdk/](https://develop.sentry.dev/sdk/)** tells
    SDK authors *what to build* -- protocol spec, envelope format, required
    behaviors.
    - **API reference** (Sphinx, TypeDoc, Javadoc, etc.) tells developers
    *what the API surface looks like* -- auto-generated from
    docstrings/annotations. Lists signatures, parameters, return types.
    - **`docs/codebase/*`** (this) explains *what was built and how it
    works* -- architecture, data flow, how modules connect, and why.
    Generated from full source analysis, not just docstrings. Aimed at SDK
    contributors and maintainers.
    
    ### Files added
    
    | File | Purpose |
    |------|---------|
    | `docs/codebase/BUILD_PLAN.md` | Portable blueprint with porting
    checklist |
    | `docs/codebase/_meta/style-guide.md` | SDK-agnostic formatting rules
    and page templates |
    | `docs/codebase/_meta/manifest.json` | Empty manifest (populated by
    first workflow run) |
    | `.github/workflows/docs-codebase-refresh.md` | Full refresh workflow
    source |
    | `.github/workflows/docs-codebase-update.md` | Incremental update
    workflow source |
    | `.github/workflows/docs-codebase-*.lock.yml` | Compiled Actions
    workflows |
    | `.gitattributes` | Marks `docs/codebase/**` as `linguist-generated` |
    
    ## Test plan
    
    - [x] `gh aw compile` produces 0 errors, 0 warnings for both workflows
    - [ ] Manual trigger via `gh aw run docs-codebase-refresh` generates
    initial docs
    - [ ] Verify generated pages cover all integrations in `_MIN_VERSIONS`
    - [ ] Push a source change to main, verify incremental workflow updates
    only affected pages
    - [ ] Both workflows create PRs (not direct commits)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    ---------
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
    dingsdax and claude authored Mar 12, 2026
    Configuration menu
    Copy the full SHA
    b3305b6 View commit details
    Browse the repository at this point in the history
  2. ci(docs): Switch agentic workflows from Copilot to Claude engine (#5654)

    ## Summary
    
    - Switch `docs-codebase-refresh` and `docs-codebase-update` GitHub
    Agentic Workflows from the default Copilot engine to `engine: claude`
    - Lock files recompiled via `gh aw compile`
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
    dingsdax and claude authored Mar 12, 2026
    Configuration menu
    Copy the full SHA
    68313e1 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2026

  1. Configuration menu
    Copy the full SHA
    6ed3404 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58361ce View commit details
    Browse the repository at this point in the history
  3. ci(docs): Remove agentic codebase documentation workflows (#5655)

    Remove the agentic CI workflows and generated artifacts introduced for
    auto-generating codebase documentation.
    
    This reverts the work from #5649 and #5654, which added GitHub Actions
    workflows to generate and refresh docs using an AI agent. The generated
    docs files (`BUILD_PLAN.md`, `_meta/manifest.json`,
    `_meta/style-guide.md`) and associated action lock files are also
    removed.
    
    The `.gitattributes` file (which was added as part of that workflow
    setup) is removed as well.
    
    Co-authored-by: Claude Sonnet 4.6 <[email protected]>
    dingsdax and claude authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    b1ddc5d View commit details
    Browse the repository at this point in the history
  4. feat(anthropic): Add gen_ai.system attribute to spans (#5661)

    Add the `gen_ai.system` span attribute (set to `"anthropic"`) to the
    Anthropic integration.
    
    Other AI integrations (OpenAI, Langchain, Google GenAI, LiteLLM,
    Pydantic AI) already set this attribute, but it was missing from the
    Anthropic integration. The attribute is set in `_set_input_data()` which
    is called for every span (streaming/non-streaming, sync/async).
    
    Refs PY-2135
    Closes #5657
    ericapisani authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    a3ee8aa View commit details
    Browse the repository at this point in the history
  5. feat(anthropic): Set gen_ai.response.id span attribute (#5662)

    Set the `gen_ai.response.id` property on spans created by the Anthropic
    integration.
    
    For non-streaming responses, the ID is read from `result.id` on the
    Message object. For streaming responses, it's captured from
    `event.message.id` in the `message_start` event and threaded through the
    iterator to be set when the stream completes.
    
    The `_collect_ai_data` function's return tuple is extended with the new
    `response_id` field, and `_set_output_data` accepts an optional
    `response_id` parameter to set on the span.
    
    Refs PY-2137
    Closes #5659
    ericapisani authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    2faa4b1 View commit details
    Browse the repository at this point in the history
  6. test(anthropic): Stop mocking response iterator (#5573)

    Replace mocks with `httpx` types to avoid test failures when library internals change.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    ddbbd0c View commit details
    Browse the repository at this point in the history
  7. test(anthropic): Stream valid JSON (#5641)

    Use double quotes for JSON strings.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    6df01e9 View commit details
    Browse the repository at this point in the history
  8. ref(anthropic): Factor out streamed result handling (#5563)

    Create dedicated functions for patching synchronous and asynchronous response iterators.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    34b595d View commit details
    Browse the repository at this point in the history
  9. ref(anthropic): Skip accumulation logic for unexpected types in strea…

    …med response (#5564)
    
    Prepare for adding patches for `.stream()`, which iterate over `MessageStreamEvent`.
    
    `MessageStreamEvent` is a superset of `RawMessageStreamEvent` returned in the iterator from `create(stream=True)`, but `RawMessageStreamEvent` instances are sufficient to collect the information required for AI Client Spans.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    58531ca View commit details
    Browse the repository at this point in the history
  10. fix(anthropic): Close span on GeneratorExit (#5643)

    Run post-iterator steps in a finally block so the AI Client Span is finished even if the generator does not complete.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    c84b6d8 View commit details
    Browse the repository at this point in the history
  11. feat(anthropic): Emit AI Client Spans for synchronous `messages.strea…

    …m()` (#5565)
    
    Patch `Messages.stream()` and `MessageStreamManager.__enter__()` to create AI Client Spans.
    
    Re-use existing code for setting attributes on AI Client Spans based on arguments to `anthropic` functions. Adapt tests that return a synchronous response stream with `create(stream=True)`.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    c3e3acc View commit details
    Browse the repository at this point in the history
  12. feat(anthropic): Emit gen_ai.chat spans for asynchronous `messages.…

    …stream()` (#5572)
    
    Patch `AsyncMessages.stream()` and `AsyncMessageStreamManager.__enter__()` to create AI Client Spans.
    
    Adapt tests that return a asynchronous response stream with `create(stream=True)`.
    alexander-alderman-webb authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    31ee64a View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ca37ab4 View commit details
    Browse the repository at this point in the history
Loading