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: mohanprasath-dev/sentry-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
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.
  • 3 commits
  • 7 files changed
  • 3 contributors

Commits on Oct 15, 2026

  1. test(monitor): Stop background health checks in tests that drive the …

    …monitor (getsentry#8032)
    
    ### Description
    
    This fixes the flaky
    `tests/test_monitor.py::test_segment_uses_downsampled_rate` (`assert
    0.25 == 0.5`,
    [job](https://github.com/getsentry/sentry-python/actions/runs/38393542918/job/115282966684)).
    Its siblings `test_transaction_uses_downsampled_rate` and
    `test_monitor_unhealthy` have the same race.
    
    **Root cause**
    These tests call `monitor.run()` by hand and assert exact
    `downsample_factor` values. They also set `monitor.interval = 0.1`. The
    first `monitor.is_healthy()` starts the monitor's background thread,
    which then calls `run()` every 0.1 s as well. On a slow runner (the
    failure was in Gevent 3.10, where the test took about 0.34 s), the
    thread runs an extra unhealthy check before the sampling decision. The
    factor goes from 1 to 2, so the sample rate is 0.25.
    
    **Fix**
    These tests now call `monitor.kill()` instead of shortening the
    interval. The thread `is_healthy()` starts then exits right away, so
    only the test's own `run()` calls change the factor. The assertions are
    unchanged, and there are no retries, sleeps or skips. SDK code is
    unchanged; this was a test bug.
    
    **Reproduction:** getsentry/repro#62 (sentry-sdk
    2.72.0, Python 3.12). With random gaps of 0–0.2 s before sampling, the
    rate was wrong in 55 of 100 iterations. With gaps under 0.1 s it was 0
    of 100, and with the background thread stopped it was 0 of 100.
    
    **Original tests, local runs** (`py3.14-common`). Each run covered the 3
    affected tests. A test-only `-p` plugin added a random wait before
    `start_transaction` / `traces.start_span` to imitate a slow runner; no
    test or SDK code was changed by it.
    - `master`, no wait: 10 of 10 runs passed. The race doesn't show up
    locally on its own.
    - `master`, 0–200 ms wait: **11 of 15 runs failed**.
    `test_segment_uses_downsampled_rate` failed 6 times and
    `test_transaction_uses_downsampled_rate` 8 times.
    - This branch, 0–200 ms wait: **40 of 40 runs passed**. The baseline
    per-test failure rate was about 40%, so 9 clean runs would already give
    99% confidence.
    - This branch, 0–500 ms wait: **20 of 20 runs passed**.
    - Regression checks: `tests/test_monitor.py`,
    `tests/tracing/test_sampling.py` and `tests/tracing/test_decorator.py`
    all passed (109 tests). `ruff` is clean. I haven't run the full common
    suite or the gevent setup locally; CI covers those.
    
    **Not changed here:** `test_trace_decorator_no_trx` also failed once,
    with leftover monitor logs (`downsampling with a factor of 10`). The
    likely cause is in `tests/conftest.py::sentry_init`: `inner()` assigns
    `client` without `nonlocal`, so the `client.close()` in teardown never
    runs. Monitor threads from earlier tests (with the 0.1 s interval) then
    keep running. I'll handle that separately, because closing every test
    client affects the whole suite.
    
    #### Issues
    * resolves: getsentry#8031
    
    <!-- junior-request-attribution:start -->
    via **johdax**.
    <!-- junior-request-attribution:end -->
    
    <!-- junior-session-footer:start -->
    <!--
    junior-conversation-id:agent-dispatch%3Adispatch_6df7374375b237816e130534b6439833
    -->
    
    --
    
    [View Junior
    Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_6df7374375b237816e130534b6439833)
    [[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_6df7374375b237816e130534b6439833/?project=4510944073809921)
    
    <!-- junior-session-footer:end -->
    
    Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
    Co-authored-by: Johannes Daxböck <johannes.daxboeck@sentry.io>
    sentry-junior[bot] and dingsdax authored Oct 15, 2026
    Configuration menu
    Copy the full SHA
    ab069a5 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2026

  1. chore(deps): update github workflows (getsentry#8036)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [actions/setup-java](https://redirect.github.com/actions/setup-java)
    ([changelog](https://redirect.github.com/actions/setup-java/compare/de7274f081f381c8f8158605e0321c36c376e2e6..b843ebf9b913146b38da2eaa7aeddf76074ae1ad))
    | | digest | `de7274f` → `b843ebf` |
    | [actions/setup-java](https://redirect.github.com/actions/setup-java)
    ([changelog](https://redirect.github.com/actions/setup-java/compare/de7274f081f381c8f8158605e0321c36c376e2e6..b843ebf9b913146b38da2eaa7aeddf76074ae1ad))
    | action | digest | `de7274f` → `b843ebf` |
    |
    [getsentry/coverage-action](https://redirect.github.com/getsentry/coverage-action)
    | | patch | `0.4.3` → `0.4.4` |
    |
    [getsentry/coverage-action](https://redirect.github.com/getsentry/coverage-action)
    | action | patch | `0.4.3` → `0.4.4` |
    | [java-jdk](https://adoptium.net) | uses-with | major | `21` → `25` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>getsentry/coverage-action</summary>
    
    ###
    [`v0.4.4`](https://redirect.github.com/getsentry/coverage-action/blob/HEAD/CHANGELOG.md#044)
    
    [Compare
    Source](https://redirect.github.com/getsentry/coverage-action/compare/0.4.3...0.4.4)
    
    ##### New Features ✨
    
    - (status) Add status-key input to namespace commit statuses by
    [@&#8203;tyrantkhan](https://redirect.github.com/tyrantkhan) in
    [#&#8203;118](https://redirect.github.com/getsentry/coverage-action/pull/118)
    
    ##### Internal Changes 🔧
    
    - (dashboard) Freeze the artifact fixture clock by
    [@&#8203;MathurAditya724](https://redirect.github.com/MathurAditya724)
    in
    [#&#8203;120](https://redirect.github.com/getsentry/coverage-action/pull/120)
    - (release) Default the merge target to main by
    [@&#8203;MathurAditya724](https://redirect.github.com/MathurAditya724)
    in
    [#&#8203;121](https://redirect.github.com/getsentry/coverage-action/pull/121)
    - (status) Document and verify independent package statuses by
    [@&#8203;MathurAditya724](https://redirect.github.com/MathurAditya724)
    in
    [#&#8203;119](https://redirect.github.com/getsentry/coverage-action/pull/119)
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: (UTC)
    
    - Branch creation
      - At any time (no schedule defined)
    - Automerge
      - At any time (no schedule defined)
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you
    are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
    rebase/retry checkbox.
    
    👻 **Immortal**: This PR will be recreated if closed unmerged. Get
    [config
    help](https://redirect.github.com/renovatebot/renovate/discussions) if
    that's undesired.
    
    ---
    
    - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
    this box
    
    ---
    
    This PR was generated by [Mend Renovate](https://mend.io/renovate/).
    View the [repository job
    log](https://developer.mend.io/github/getsentry/sentry-python).
    
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNTYuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjE1Ni4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
    renovate[bot] and sentry-junior[bot] authored Oct 16, 2026
    Configuration menu
    Copy the full SHA
    304e044 View commit details
    Browse the repository at this point in the history
  2. chore(deps): update github workflows (getsentry#8045)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [getsentry/craft](https://redirect.github.com/getsentry/craft) |
    action | minor | `2.34.1` → `2.35.0` |
    | [getsentry/craft](https://redirect.github.com/getsentry/craft)
    ([changelog](https://redirect.github.com/getsentry/craft/compare/3f2abdc5703191d12ef2cc013f792f1bd220f44d..7a7857552e2cdc08b502de96e6076849c01fba32))
    | workflow | digest | `3f2abdc` → `7a78575` |
    | [java-jdk](https://adoptium.net) | uses-with | major | `21` → `25` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>getsentry/craft</summary>
    
    ###
    [`v2.35.0`](https://redirect.github.com/getsentry/craft/blob/HEAD/CHANGELOG.md#2350)
    
    [Compare
    Source](https://redirect.github.com/getsentry/craft/compare/2.34.1...2.35.0)
    
    ##### New Features ✨
    
    - (changelog) Add configurable AI summaries for CLI and Actions by
    [@&#8203;MathurAditya724](https://redirect.github.com/MathurAditya724)
    in [#&#8203;902](https://redirect.github.com/getsentry/craft/pull/902)
    - (distribution) Release native Craft with install and setup tools by
    [@&#8203;MathurAditya724](https://redirect.github.com/MathurAditya724)
    in [#&#8203;904](https://redirect.github.com/getsentry/craft/pull/904)
    
    ##### Bug Fixes 🐛
    
    - (nuget) Pass --timeout to dotnet nuget push by
    [@&#8203;sentry-junior](https://redirect.github.com/sentry-junior) in
    [#&#8203;901](https://redirect.github.com/getsentry/craft/pull/901)
    
    ##### Internal Changes 🔧
    
    - Add standalone Fossilize binaries and native smoke tests by
    [@&#8203;MathurAditya724](https://redirect.github.com/MathurAditya724)
    in [#&#8203;903](https://redirect.github.com/getsentry/craft/pull/903)
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: (UTC)
    
    - Branch creation
      - At any time (no schedule defined)
    - Automerge
      - At any time (no schedule defined)
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you
    are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
    rebase/retry checkbox.
    
    👻 **Immortal**: This PR will be recreated if closed unmerged. Get
    [config
    help](https://redirect.github.com/renovatebot/renovate/discussions) if
    that's undesired.
    
    ---
    
    - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
    this box
    
    ---
    
    This PR was generated by [Mend Renovate](https://mend.io/renovate/).
    View the [repository job
    log](https://developer.mend.io/github/getsentry/sentry-python).
    
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
    renovate[bot] and sentry-junior[bot] authored Oct 16, 2026
    Configuration menu
    Copy the full SHA
    0f7acd5 View commit details
    Browse the repository at this point in the history
Loading