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: 038a429
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: f5e93ad
Choose a head ref
  • 18 commits
  • 45 files changed
  • 8 contributors

Commits on Mar 17, 2026

  1. Merge branch 'release/2.55.0'

    getsentry-bot committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    dd16cc2 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md (#5685)

    ### Description
    <!-- What changed and why? -->
    
    #### Issues
    <!--
    * resolves: #1234
    * resolves: LIN-1234
    -->
    
    #### Reminders
    - Please add tests to validate your changes, and lint your code using
    `tox -e linters`.
    - Add GH Issue ID _&_ Linear ID (if applicable)
    - PR title should use [conventional
    commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
    style (`feat:`, `fix:`, `ref:`, `meta:`)
    - For external contributors:
    [CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
    [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
    community](https://discord.gg/Ww9hbqr)
    sentrivana authored Mar 17, 2026
    Configuration menu
    Copy the full SHA
    0374688 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2026

  1. Configuration menu
    Copy the full SHA
    c4df76b View commit details
    Browse the repository at this point in the history
  2. fix(anthropic): Patch Stream.close() and MessageStream.close() to…

    … finish spans (#5674)
    
    Finish AI Client Spans when `close()` is called and not merely when the streamed response iterator is consumed or the GC collects the `_iterator` instance variable. The `close()` method closes the HTTP connection.
    alexander-alderman-webb authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    8203912 View commit details
    Browse the repository at this point in the history
  3. fix(anthropic): Patch AsyncStream.close() and `AsyncMessageStream.c…

    …lose()` to finish spans (#5675)
    
    Finish AI Client Spans when `close()` is called and not merely when the streamed response iterator is consumed or the GC collects the `_iterator` instance variable. The `close()` method closes the HTTP connection.
    alexander-alderman-webb authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    6d33d36 View commit details
    Browse the repository at this point in the history
  4. feat(logging): Separate ignore lists for events/breadcrumbs and sentr…

    …y logs (#5698)
    
    ### Description
    
    Split `_IGNORED_LOGGERS` into two independent sets so that framework
    loggers silenced for events/breadcrumbs (e.g. `django.server`) can still
    be captured as Sentry Logs.
    
    - `_IGNORED_LOGGERS` controls `EventHandler` and `BreadcrumbHandler`
    - `_IGNORED_LOGGERS_SENTRY_LOGS` controls `SentryLogsHandler`
    - Add `ignore_logger_for_sentry_logs()` and `unignore_logger*()` helpers
    - Move `_can_record` into each handler class with its own ignore set
    - Split `_handle_record` into separate event and sentry-logs paths
    
    #### Issues
    
    * resolves: #5689
    * resolves: PY-2146
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    sl0thentr0py and claude authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    238cadf View commit details
    Browse the repository at this point in the history
  5. ref(tox): Allow overriding TESTPATH via env var for targeted test runs (

    #5699)
    
    ### Description
    
    Allows better agentic testing flow.
    
    Rename internal `TESTPATH` to `_TESTPATH` in setenv and add `TESTPATH`
    to `passenv`.
    The pytest command now uses `{env:TESTPATH:{env:_TESTPATH}}`, so setting
    TESTPATH externally overrides the default test path. This allows running
    specific test files without the --override workaround:
    
    ```
      TESTPATH=tests/integrations/logging/test_logging.py tox -e py3.14-common
    ```
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    sl0thentr0py and claude authored Mar 18, 2026
    Configuration menu
    Copy the full SHA
    5d6cf7e View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2026

  1. Configuration menu
    Copy the full SHA
    dc65e13 View commit details
    Browse the repository at this point in the history
  2. feat: Make ASGI support span first (#5680)

    This PR makes the ASGI integration work both in legacy and span
    streaming mode. Some features and attributes will be missing in span
    streaming mode for now (see the Out of scope section below).
    
    Best reviewed with whitespace ignored:
    https://github.com/getsentry/sentry-python/pull/5680/changes?w=1
    
    ---
    
    A bit of a background on migrating integrations to span first. In order
    to support both legacy spans and span streaming, most integrations will
    follow the same patterns:
    
    ### API
    
    We need to use the `start_span` API from `sentry_sdk.traces` if we're in
    span streaming mode (`traces_lifecycle="stream"`).
    
    There are no transactions anymore. Top-level spans will also be started
    via the `start_span` API in span streaming mode.
    
    ### Setting data on spans
    
    If an integration sets data on a span (via `span.set_data`,
    `span.set_tag` etc.), it should use `span.set_attribute` when span
    streaming is enabled.
    
    The attributes that we set need to be in Sentry conventions. This is
    deliberately not the case for most quick ports of integrations like this
    one and will follow in [a future
    step](#5152).
    
    ### Trace propagation
    
    If an integration sits at a service boundary and is capable of
    propagating incoming trace information (like WSGI/ASGI or Celery), in
    span first mode we need to switch from the old style `with
    continue_trace(...) as transaction:` to the [new style
    `continue_trace()` and
    `new_trace()`](https://sentry-docs-git-ivana-span-first-migration-guide.sentry.dev/platforms/python/migration/span-first/#trace-propagation)
    (not context managers).
    
    ### `start_span` arguments
    
    You can pass things like `op`, `origin`, `source` to the old
    `start_span` API. With the new API, this is no longer possible, and the
    individual properties need to be set as attributes directly.
    
    ### Out of scope
    
    For now, the following is out of scope and will follow in the future:
    - Making sure all attributes are correct and that they're set in Sentry
    conventions: #5152
    - Migrating event processors (as streaming spans are not events, event
    processors are not run on them, meaning some data will not be set yet):
    #5152
    sentrivana authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    e103926 View commit details
    Browse the repository at this point in the history
  3. fix(anthropic): Set exception info on streaming span when applicable (#…

    …5683)
    
    Consolidate span finishing logic in a new `_StreamSpanContext` context manager.
    Forward exception info from `_StreamSpanContext.__exit__()` to `Span.__exit__()`.
    alexander-alderman-webb authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    8d56b30 View commit details
    Browse the repository at this point in the history
  4. ci: 🤖 Update test matrix with new releases (03/19) (#5703)

    Update our test matrix with new releases of integrated frameworks and
    libraries.
    
    ## How it works
    - Scan PyPI for all supported releases of all frameworks we have a
    dedicated test suite for.
    - Pick a representative sample of releases to run our test suite
    against. We always test the latest and oldest supported version.
    - Update
    [tox.ini](https://github.com/getsentry/sentry-python/blob/master/tox.ini)
    with the new releases.
    
    ## Action required
    - If CI passes on this PR, it's safe to approve and merge. It means our
    integrations can handle new versions of frameworks that got pulled in.
    - If CI doesn't pass on this PR, this points to an incompatibility of
    either our integration or our test setup with a new version of a
    framework.
    - Check what the failures look like and either fix them, or update the
    [test
    config](https://github.com/getsentry/sentry-python/blob/master/scripts/populate_tox/config.py)
    and rerun
    [scripts/generate-test-files.sh](https://github.com/getsentry/sentry-python/blob/master/scripts/generate-test-files.sh).
    See
    [scripts/populate_tox/README.md](https://github.com/getsentry/sentry-python/blob/master/scripts/populate_tox/README.md)
    for what configuration options are available.
    
     _____________________
    
    _🤖 This PR was automatically created using [a GitHub
    action](https://github.com/getsentry/sentry-python/blob/master/.github/workflows/update-tox.yml)._
    
    ---------
    
    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
    github-actions[bot] and sentrivana authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    35fe9e4 View commit details
    Browse the repository at this point in the history
  5. ci: Use date-based branch names for toxgen PRs (#5704)

    Reusing the `toxgen/update` branch can get annoying, especially since it
    needs manual babysitting (empty commit to trigger CI). Let's use
    distinct names instead.
    
    ## Summary
    - Instead of always reusing the same `toxgen/update` branch, the "Update
    test matrix" workflow now creates a date-based branch (e.g.
    `toxgen/update-03-19`).
    - Same-day reruns force-push to the same branch, so they overwrite
    rather than fail.
    - The PR-closing logic now finds and closes all open PRs from any
    `toxgen/` branch, not just the current one.
    
    ## Test plan
    - [ ] Trigger the "Update test matrix" workflow manually and verify it
    creates a branch like `toxgen/update-MM-DD`
    - [ ] Trigger it again on the same day and verify it overwrites the
    branch and closes the previous PR
    - [ ] Verify old toxgen PRs from different branches get closed
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    sentrivana and claude authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    715fd2b View commit details
    Browse the repository at this point in the history
  6. tests: Add -latest alias for each integration test suite (#5706)

    ## Summary
    - For every auto-generated integration, adds a tox environment that
    aliases the highest tested version (e.g. `tox -e py3.14-httpx-latest` =
    `tox -e py3.14-httpx-v0.28.1`)
    - Makes it easy to run tests against the latest version without looking
    up exact version strings
    
    ## Notes
    - The new latest env is NOT run in CI
    - The new latest env points to the highest non-prerelease env
    
    ---------
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    sentrivana and claude authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    f963475 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2026

  1. feat(asgi): Add option to disable suppressing chained exceptions (#5714)

    Add the experimental `suppress_asgi_chained_exceptions` option. The option defaults to `True` when unset, preserving the current behavior.
    alexander-alderman-webb authored Mar 20, 2026
    Configuration menu
    Copy the full SHA
    48dc566 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2026

  1. Configuration menu
    Copy the full SHA
    b2b42df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c3eb19f View commit details
    Browse the repository at this point in the history
  3. chore: pin GitHub Actions to full-length commit SHAs (#5781)

    ## Summary
    
    - Pin all GitHub Actions references in `.github/` workflow files to
    full-length commit SHAs
    
    Generated by `devenv pin_gha`.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    joshuarli authored Mar 23, 2026
    Configuration menu
    Copy the full SHA
    4cd6752 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2026

  1. Configuration menu
    Copy the full SHA
    f5e93ad View commit details
    Browse the repository at this point in the history
Loading