releases.shpreview
Sentry/Sentry Python

Sentry Python

$npx -y @buildinternet/releases show sentry-python
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases18Avg6/moVersionsv2.50.0 → v2.57.0
Nov 29, 2023

Various fixes & improvements

  • Only add trace context to checkins and do not run event_processors for checkins (#2536) by @antonpirker
  • Metric span summaries (#2522) by @mitsuhiko
  • Add source context to code locations (#2539) by @jan-auer
  • Use in-app filepath instead of absolute path (#2541) by @antonpirker
  • Switch to jinja2 for generating CI yamls (#2534) by @sentrivana
Nov 24, 2023

Various fixes & improvements

  • Move installed modules code to utils (#2429) by @sentrivana

    Note: We moved the internal function _get_installed_modules from sentry_sdk.integrations.modules to sentry_sdk.utils. So if you use this function you have to update your imports

  • Add code locations for metrics (#2526) by @jan-auer

  • Add query source to DB spans (#2521) by @antonpirker

  • Send events to Spotlight sidecar (#2524) by @HazAT

  • Run integration tests with newest pytest (#2518) by @sentrivana

  • Bring tests up to date (#2512) by @sentrivana

  • Fix: Prevent global var from being discarded at shutdown (#2530) by @antonpirker

  • Fix: Scope transaction source not being updated in scope.span setter (#2519) by @sl0thentr0py

Nov 21, 2023
  • Django: Support Django 5.0 (#2490) by @sentrivana
  • Django: Handling ASGI body in the right way. (#2513) by @antonpirker
  • Flask: Test with Flask 3.0 (#2506) by @sentrivana
  • Celery: Do not create a span when task is triggered by Celery Beat (#2510) by @antonpirker
  • Redis: Ensure RedisIntegration is disabled, unless redis is installed (#2504) by @szokeasaurusrex
  • Quart: Fix Quart integration for Quart 0.19.4 (#2516) by @antonpirker
  • gRPC: Make async gRPC less noisy (#2507) by @jyggen
Nov 13, 2023

Various fixes & improvements

  • Updated gRPC integration: Asyncio interceptors and easier setup (#2369) by @fdellekart

    Our gRPC integration now instruments incoming unary-unary grpc requests and outgoing unary-unary, unary-stream grpc requests using grpcio channels. Everything works now for sync and async code.

    Before this release you had to add Sentry interceptors by hand to your gRPC code, now the only thing you need to do is adding the GRPCIntegration to you sentry_sdk_init() call. (See documentation for more information):

    import sentry_sdk
    from sentry_sdk.integrations.grpc import GRPCIntegration
    
    sentry_sdk.init(
        dsn="___PUBLIC_DSN___",
        enable_tracing=True,
        integrations=[
            GRPCIntegration(),
        ],
    )
    

    The old way still works, but we strongly encourage you to update your code to the way described above.

  • Python 3.12: Replace deprecated datetime functions (#2502) by @sentrivana

  • Metrics: Unify datetime format (#2409) by @mitsuhiko

  • Celery: Set correct data in check_ins (#2500) by @antonpirker

  • Celery: Read timezone for Crons monitors from celery_schedule if existing (#2497) by @antonpirker

  • Django: Removing redundant code in Django tests (#2491) by @vagi8

  • Django: Make reading the request body work in Django ASGI apps. (#2495) by @antonpirker

  • FastAPI: Use wraps on fastapi request call wrapper (#2476) by @nkaras

  • Fix: Probe for psycopg2 and psycopg3 parameters function. (#2492) by @antonpirker

  • Fix: Remove unnecessary TYPE_CHECKING alias (#2467) by @rafrafek

Nov 2, 2023

Various fixes & improvements

  • Added Python 3.12 support (#2471, #2483)
  • Handle missing connection_kwargs in patch_redis_client (#2482) by @szokeasaurusrex
  • Run common test suite on Python 3.12 (#2479) by @sentrivana
Oct 31, 2023

Various fixes & improvements

  • Make parse_version work in utils.py itself. (#2474) by @antonpirker

Various fixes & improvements

  • New: Added error_sampler option (#2456) by @szokeasaurusrex
  • Python 3.12: Detect interpreter in shutdown state on thread spawn (#2468) by @mitsuhiko
  • Patch eventlet under Sentry SDK (#2464) by @szokeasaurusrex
  • Mitigate CPU spikes when sending lots of events with lots of data (#2449) by @antonpirker
  • Make debug option also configurable via environment (#2450) by @antonpirker
  • Make sure get_dsn_parameters is an actual function (#2441) by @sentrivana
  • Bump pytest-localserver, add compat comment (#2448) by @sentrivana
  • AWS Lambda: Update compatible runtimes for AWS Lambda layer (#2453) by @antonpirker
  • AWS Lambda: Load AWS Lambda secrets in Github CI (#2153) by @antonpirker
  • Redis: Connection attributes in redis database spans (#2398) by @antonpirker
  • Falcon: Falcon integration checks response status before reporting error (#2465) by @szokeasaurusrex
  • Quart: Support Quart 0.19 onwards (#2403) by @pgjones
  • Sanic: Sanic integration initial version (#2419) by @szokeasaurusrex
  • Django: Fix parsing of Django path patterns (#2452) by @sentrivana
  • Django: Add Django 4.2 to test suite (#2462) by @sentrivana
  • Polish changelog (#2434) by @sentrivana
  • Update CONTRIBUTING.md (#2443) by @krishvsoni
  • Update README.md (#2435) by @sentrivana
Oct 11, 2023

Various fixes & improvements

  • New: Error monitoring for some of the most popular Python GraphQL libraries:

    • Add GQL GraphQL integration (#2368) by @szokeasaurusrex

      Usage:

        import sentry_sdk
        from sentry_sdk.integrations.gql import GQLIntegration
      
        sentry_sdk.init(
            dsn='___PUBLIC_DSN___',
            integrations=[
                GQLIntegration(),
            ],
        )
      
    • Add Graphene GraphQL error integration (#2389) by @sentrivana

      Usage:

        import sentry_sdk
        from sentry_sdk.integrations.graphene import GrapheneIntegration
      
        sentry_sdk.init(
            dsn='___PUBLIC_DSN___',
            integrations=[
                GrapheneIntegration(),
            ],
        )
      
    • Add Strawberry GraphQL error & tracing integration (#2393) by @sentrivana

      Usage:

        import sentry_sdk
        from sentry_sdk.integrations.strawberry import StrawberryIntegration
      
        sentry_sdk.init(
            dsn='___PUBLIC_DSN___',
            integrations=[
                # make sure to set async_execution to False if you're executing
                # GraphQL queries synchronously
                StrawberryIntegration(async_execution=True),
            ],
            traces_sample_rate=1.0,
        )
      
    • Add Ariadne GraphQL error integration (#2387) by @sentrivana

      Usage:

        import sentry_sdk
        from sentry_sdk.integrations.ariadne import AriadneIntegration
      
        sentry_sdk.init(
            dsn='___PUBLIC_DSN___',
            integrations=[
                AriadneIntegration(),
            ],
        )
      
  • Capture multiple named groups again (#2432) by @sentrivana

  • Don't fail when upstream scheme is unusual (#2371) by @vanschelven

  • Support new RQ version (#2405) by @antonpirker

  • Remove utcnow, utcfromtimestamp deprecated in Python 3.12 (#2415) by @rmad17

  • Add trace to __all__ in top-level __init__.py (#2401) by @lobsterkatie

  • Move minimetrics code to the SDK (#2385) by @mitsuhiko

  • Add configurable compression levels (#2382) by @mitsuhiko

  • Shift flushing by up to a rollup window (#2396) by @mitsuhiko

  • Make a consistent noop flush behavior (#2428) by @mitsuhiko

  • Stronger recursion protection (#2426) by @mitsuhiko

  • Remove OpenTelemetryIntegration from __init__.py (#2379) by @sentrivana

  • Update API docs (#2397) by @antonpirker

  • Pin some test requirements because new majors break our tests (#2404) by @antonpirker

  • Run more requests, celery, falcon tests (#2414) by @sentrivana

  • Move importorskips in tests to __init__.py files (#2412) by @sentrivana

  • Fix mypy errors (#2433) by @sentrivana

  • Fix pre-commit issues (#2424) by @bukzor-sentryio

  • Update CONTRIBUTING.md (#2411) by @sentrivana

  • Bump sphinx from 7.2.5 to 7.2.6 (#2378) by @dependabot

  • [Experimental] Add explain plan to DB spans (#2315) by @antonpirker

Sep 13, 2023

Various fixes & improvements

  • New: Add integration for clickhouse-driver (#2167) by @mimre25

    For more information, see the documentation for clickhouse-driver for more information.

    Usage:

      import sentry_sdk
      from sentry_sdk.integrations.clickhouse_driver import ClickhouseDriverIntegration
    
      sentry_sdk.init(
          dsn='___PUBLIC_DSN___',
          integrations=[
              ClickhouseDriverIntegration(),
          ],
      )
    
  • New: Add integration for asyncpg (#2314) by @mimre25

    For more information, see the documentation for asyncpg for more information.

    Usage:

      import sentry_sdk
      from sentry_sdk.integrations.asyncpg import AsyncPGIntegration
    
      sentry_sdk.init(
          dsn='___PUBLIC_DSN___',
          integrations=[
              AsyncPGIntegration(),
          ],
      )
    
  • New: Allow to override propagate_traces in Celery per task (#2331) by @jan-auer

    For more information, see the documentation for Celery for more information.

    Usage:

      import sentry_sdk
      from sentry_sdk.integrations.celery import CeleryIntegration
    
      # Enable global distributed traces (this is the default, just to be explicit.)
      sentry_sdk.init(
          dsn='___PUBLIC_DSN___',
          integrations=[
              CeleryIntegration(propagate_traces=True),
          ],
      )
    
      ...
    
      # This will NOT propagate the trace. (The task will start its own trace):
      my_task_b.apply_async(
          args=("some_parameter", ),
          headers={"sentry-propagate-traces": False},
      )
    
  • Prevent Falcon integration from breaking ASGI apps (#2359) by @szokeasaurusrex

  • Backpressure: only downsample a max of 10 times (#2347) by @sl0thentr0py

  • Made NoOpSpan compatible to Transactions. (#2364) by @antonpirker

  • Cleanup ASGI integration (#2335) by @antonpirker

  • Pin anyio in tests (dep of httpx), because new major 4.0.0 breaks tests. (#2336) by @antonpirker

  • Added link to backpressure section in docs. (#2354) by @antonpirker

  • Add .vscode to .gitignore (#2317) by @shoaib-mohd

  • Documenting Spans and Transactions (#2358) by @antonpirker

  • Fix in profiler: do not call getcwd from module root (#2329) by @Zylphrex

  • Fix deprecated version attribute (#2338) by @vagi8

  • Fix transaction name in Starlette and FastAPI (#2341) by @antonpirker

  • Fix tests using Postgres (#2362) by @antonpirker

  • build(deps): Updated linting tooling (#2350) by @antonpirker

  • build(deps): bump sphinx from 7.2.4 to 7.2.5 (#2344) by @dependabot

  • build(deps): bump actions/checkout from 2 to 4 (#2352) by @dependabot

  • build(deps): bump checkouts/data-schemas from ebc77d3 to 68def1e (#2351) by @dependabot

Aug 1, 2023

Various fixes & improvements

  • Revert GraphQL integration (#2287) by @sentrivana

Various fixes & improvements

  • Fix GraphQL integration swallowing responses (#2286) by @sentrivana
  • Fix typo (#2283) by @sentrivana
Jul 31, 2023

Various fixes & improvements

  • Capture GraphQL client errors (#2243) by @sentrivana
    • The SDK will now create dedicated errors whenever an HTTP client makes a reqwuest to a /graphql endpoint and the response contains an error. You can opt out of this by providing capture_graphql_errors=False to the HTTP client integration.
  • Read MAX_VALUE_LENGTH from client options (#2121) (#2171) by @puittenbroek
  • Rename request_bodies to max_request_body_size (#2247) by @mgaligniana
  • Always sample checkin regardless of sample_rate (#2279) by @szokeasaurusrex
  • Add information to short-interval cron error message (#2246) by @lobsterkatie
  • Add DB connection attributes in spans (#2274) by @antonpirker
  • Add db.system to remaining Redis spans (#2271) by @AbhiPrasad
  • Clarified the procedure for running tests (#2276) by @szokeasaurusrex
  • Fix Chalice tests (#2278) by @sentrivana
  • Bump Black from 23.3.0 to 23.7.0 (#2256) by @dependabot
  • Remove py3.4 from tox.ini (#2248) by @sentrivana
Jul 13, 2023

Various fixes & improvements

  • Redis: Add support for redis.asyncio (#1933) by @Zhenay
  • Make sure each task that is started by Celery Beat has its own trace. (#2249) by @antonpirker
  • Add Sampling Decision to Trace Envelope Header (#2239) by @antonpirker
  • Do not add trace headers (sentry-trace and baggage) to HTTP requests to Sentry (#2240) by @antonpirker
  • Prevent adding sentry-trace header multiple times (#2235) by @antonpirker
  • Skip distributions with incomplete metadata (#2231) by @rominf
  • Remove stale.yml (#2245) by @hubertdeng123
  • Django: Fix 404 Handler handler being labeled as "generic ASGI request" (#1277) by @BeryJu
Jul 10, 2023

Various fixes & improvements

  • Add support for cron jobs in ARQ integration (#2088) by @lewazo
  • Backpressure handling prototype (#2189) by @sl0thentr0py
  • Add "replay" context to event payload (#2234) by @antonpirker
  • Update test Django app to be compatible for Django 4.x (#1794) by @DilLip-Chowdary-Codes
Jul 4, 2023

Various fixes & improvements

  • Support for SQLAlchemy 2.0 (#2200) by @antonpirker

  • Add instrumentation of aiohttp client requests (#1761) by @md384

  • Add Django template tag for adding Sentry tracing information (#2222) by @antonpirker

    • By adding {{ sentry_trace_meta }} to your Django templates we will include Sentry trace information as a meta tag in the rendered HTML to allow your frontend to pick up and continue the trace started in the backend.
  • Update Flask HTML meta helper (#2203) by @antonpirker

  • Take trace ID always from propagation context (#2209) by @antonpirker

  • Fix trace context in event payload (#2205) by @antonpirker

  • Use new top level API in trace_propagation_meta (#2202) by @antonpirker

  • Do not overwrite existing baggage on outgoing requests (#2191, #2214) by @sentrivana

  • Set the transaction/span status from an OTel span (#2115) by @daniil-konovalenko

  • Fix propagation of OTel NonRecordingSpan (#2187) by @hartungstenio

  • Fix TaskLockedException handling in Huey integration (#2206) by @Zhenay

  • Add message format configuration arguments to Loguru integration (#2208) by @Gwill

  • Profiling: Add client reports for profiles (#2207) by @Zylphrex

  • CI: Fix CI (#2220) by @antonpirker

  • Dependencies: Bump checkouts/data-schemas from 7fdde87 to 1b85152 (#2218) by @dependabot

  • Dependencies: Bump mypy from 1.3.0 to 1.4.1 (#2194) by @dependabot

  • Docs: Change API doc theme (#2210) by @sentrivana

  • Docs: Allow (some) autocompletion for top-level API (#2213) by @sentrivana

  • Docs: Revert autocomplete hack (#2224) by @sentrivana

Jun 22, 2023

Various fixes & improvements

  • Tracing without performance (#2136) by @antonpirker
  • Load tracing information from environment (#2176) by @antonpirker
  • Auto-enable HTTPX integration if HTTPX installed (#2177) by @sentrivana
  • Support for SOCKS proxies (#1050) by @Roguelazer
  • Wrap parse_url calls in capture_internal_exceptions (#2162) by @sentrivana
  • Run 2.7 tests in CI again (#2181) by @sentrivana
  • Crons: Do not support sub-minute cron intervals (#2172) by @antonpirker
  • Profile: Add function name to profiler frame cache (#2164) by @Zylphrex
  • Dependencies: bump checkouts/data-schemas from 0ed3357 to 7fdde87 (#2165) by @dependabot
  • Update changelog (#2163) by @sentrivana
Jun 7, 2023

Django update (ongoing)

Collections of improvements to our Django integration.

By: @mgaligniana (#1773)

Various fixes & improvements

  • Fix parse_url (#2161) by @sentrivana and @antonpirker

    Our URL sanitization used in multiple integrations broke with the recent Python security update. If you started seeing ValueErrors with "'Filtered' does not appear to be an IPv4 or IPv6 address", this release fixes that. See the original issue for more context.

  • Better version parsing in integrations (#2152) by @antonpirker

    We now properly support all integration versions that conform to PEP 440. This replaces our naïve version parsing that wouldn't accept versions such as 2.0.0rc1 or 2.0.5.post1.

  • Align HTTP status code as span data field http.response.status_code (#2113) by @antonpirker

  • Do not encode cached value to determine size (#2143) by @sentrivana

  • Fix using unittest.mock whenever available (#1926) by @mgorny

  • Fix 2.7 common tests (#2145) by @sentrivana

  • Bump actions/stale from 6 to 8 (#1978) by @dependabot

  • Bump black from 22.12.0 to 23.3.0 (#1984) by @dependabot

  • Bump mypy from 1.2.0 to 1.3.0 (#2110) by @dependabot

  • Bump sphinx from 5.3.0 to 7.0.1 (#2112) by @dependabot

Jun 2, 2023

Various fixes & improvements

  • Support urllib3>=2.0.0 (#2148) by @asottile-sentry

    We're now supporting urllib3's new major version, 2.0.0. If you encounter issues (e.g. some of your dependencies not supporting the new urllib3 version yet) you might consider pinning the urllib3 version to <2.0.0 manually in your project. Check out the the urllib3 migration guide for details.

  • Auto-retry tests on failure (#2134) by @sentrivana

  • Correct importlib.metadata check in test_modules (#2149) by @asottile-sentry

  • Fix distribution name normalization (PEP-0503) (#2144) by @rominf

  • Fix functions_to_trace typing (#2141) by @rcmarron

May 23, 2023

Various fixes & improvements

  • New: Celery Beat exclude tasks option (#2130) by @antonpirker

    You can exclude Celery Beat tasks from being auto-instrumented. To do this, add a list of tasks you want to exclude as option exclude_beat_tasks when creating CeleryIntegration. The list can contain simple strings with the full task name, as specified in the Celery Beat schedule, or regular expressions to match multiple tasks.

    For more information, see the documentation for Crons for more information.

    Usage:

        exclude_beat_tasks = [
            "some-task-a",
            "payment-check-.*",
        ]
        sentry_sdk.init(
            dsn='___PUBLIC_DSN___',
            integrations=[
                CeleryIntegration(
                    monitor_beat_tasks=True,
                    exclude_beat_tasks=exclude_beat_tasks,
                ),
            ],
        )
    

    In this example the task some-task-a and all tasks with a name starting with payment-check- will be ignored.

  • New: Add support for ExceptionGroups (#2025) by @antonpirker

    Note: If running Self-Hosted Sentry, you should wait to adopt this SDK update until after updating to the 23.6.0 (est. June 2023) release of Sentry. Updating early will not break anything, but you will not get the full benefit of the Exception Groups improvements to issue grouping that were added to the Sentry backend.

  • Prefer importlib.metadata over pkg_resources if available (#2081) by @sentrivana

  • Work with a copy of request, vars in the event (#2125) by @sentrivana

  • Pinned version of dependency that broke the build (#2133) by @antonpirker

May 17, 2023

Various fixes & improvements

  • Disable Django Cache spans by default. (#2120) by @antonpirker
Latest
2.58.0
Tracking Since
Jul 6, 2021
Last checked Apr 20, 2026