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
Mar 31, 2025

Various fixes & improvements

  • New Beta Feature Enable Sentry logs in logging Integration (#4143) by @colin-sentry

    You can now send existing log messages to the new Sentry Logs feature.

    For more information see: https://github.com/getsentry/sentry/discussions/86804

    This is how you can use it (Sentry Logs is in beta right now so the API can still change):

    import logging
    
    import sentry_sdk
    from sentry_sdk.integrations.logging import LoggingIntegration
    
    # Setup Sentry SDK to send log messages with a level of "error" or higher to Sentry.
    sentry_sdk.init(
      dsn="...",
      _experiments={
          "enable_sentry_logs": True
      }
      integrations=[
        LoggingIntegration(sentry_logs_level=logging.ERROR),
      ]
    )
    
    # Your existing logging setup
    some_logger = logging.Logger("some-logger")
    
    some_logger.info('In this example info events will not be sent to Sentry logs. my_value=%s', my_value)
    some_logger.error('But error events will be sent to Sentry logs. my_value=%s', my_value)
    
  • Spotlight: Sample everything 100% w/ Spotlight & no DSN set (#4207) by @BYK

  • Dramatiq: use set_transaction_name (#4175) by @timdrijvers

  • toxgen: Make it clearer which suites can be migrated (#4196) by @sentrivana

  • Move Litestar under toxgen (#4197) by @sentrivana

  • Added flake8 plugings to pre-commit call of flake8 (#4190) by @antonpirker

  • Deprecate Scope.user (#4194) by @sentrivana

  • Fix hanging when capturing long stacktrace (#4191) by @szokeasaurusrex

  • Fix GraphQL failures (#4208) by @sentrivana

  • Fix flaky test (#4198) by @sentrivana

  • Update Ubuntu in Github test runners (#4204) by @antonpirker

Mar 24, 2025

Various fixes & improvements

  • Always set _spotlight_url (#4186) by @BYK
  • Broader except in Django parsed_body (#4189) by @orhanhenrik
  • Add platform header to the chunk item-type in the envelope (#4178) by @viglia
  • Move mypy config into pyproject.toml (#4181) by @antonpirker
  • Move flake8 config into pyproject.toml (#4185) by @antonpirker
  • Move pytest config into pyproject.toml (#4184) by @antonpirker
  • Bump actions/create-github-app-token from 1.11.6 to 1.11.7 (#4188) by @dependabot
  • Add CODEOWNERS (#4182) by @sentrivana
Mar 21, 2025

Various fixes & improvements

  • fix(tracing): Fix InvalidOperation (#4179) by @szokeasaurusrex
  • Fix memory leak by not piling up breadcrumbs forever in Spark workers. (#4167) by @antonpirker
  • Update scripts sources (#4166) by @emmanuel-ferdman
  • Fixed flaky test (#4165) by @antonpirker
  • chore(profiler): Add deprecation warning for session functions (#4171) by @sentrivana
  • feat(profiling): reverse profile_session start/stop methods deprecation (#4162) by @viglia
  • Reset DedupeIntegration's last-seen if before_send dropped the event (#4142) by @sentrivana
  • style(integrations): Fix captured typo (#4161) by @pimuzzo
  • Handle loguru msg levels that are not supported by Sentry (#4147) by @antonpirker
  • feat(tests): Update tox.ini (#4146) by @sentrivana
  • Support Starlette/FastAPI app.host (#4157) by @sentrivana
Mar 17, 2025

Various fixes & improvements

  • Fix import problem in release 2.23.0 (#4140) by @antonpirker

Various fixes & improvements

  • Feat(profiling): Add new functions to start/stop continuous profiler (#4056) by @Zylphrex
  • Feat(profiling): Export start/stop profile session (#4079) by @Zylphrex
  • Feat(tracing): Backfill missing sample_rand on PropagationContext (#4038) by @szokeasaurusrex
  • Feat(logs): Add alpha version of Sentry logs (#4126) by @colin-sentry
  • Security(gha): fix potential for shell injection (#4099) by @mdtro
  • Docs: Add init() parameters to ApiDocs. (#4100) by @antonpirker
  • Docs: Document that caller must check mutable (#4010) by @szokeasaurusrex
  • Fix(Anthropic): Add partial json support to streams (#3674)
  • Fix(ASGI): Fix KeyError if transaction does not exist (#4095) by @kevinji
  • Fix(asyncio): Improve asyncio integration error handling. (#4129) by @antonpirker
  • Fix(AWS Lambda): Fix capturing errors during AWS Lambda INIT phase (#3943)
  • Fix(Bottle): Prevent internal error on 404 (#4131) by @sentrivana
  • Fix(CI): Fix API doc failure in CI (#4075) by @sentrivana
  • Fix(ClickHouse) ClickHouse in test suite (#4087) by @antonpirker
  • Fix(cloudresourcecontext): Added timeout to HTTP requests in CloudResourceContextIntegration (#4120) by @antonpirker
  • Fix(crons): Fixed bug when cron_jobs is set to None in arq integration (#4115) by @antonpirker
  • Fix(debug): Take into account parent handlers for debug logger (#4133) by @sentrivana
  • Fix(FastAPI/Starlette): Fix middleware with positional arguments. (#4118) by @antonpirker
  • Fix(featureflags): add LRU update/dedupe test coverage (#4082)
  • Fix(logging): Coerce None values into strings in logentry params. (#4121) by @antonpirker
  • Fix(pyspark): Grab attemptId more defensively (#4130) by @sentrivana
  • Fix(Quart): Support quart_flask_patch (#4132) by @sentrivana
  • Fix(tests): A way to locally run AWS Lambda functions (#4128) by @antonpirker
  • Fix(tests): Add concurrency testcase for arq (#4125) by @sentrivana
  • Fix(tests): Add fail_on_changes to toxgen by @sentrivana
  • Fix(tests): Run AWS Lambda tests locally (#3988) by @antonpirker
  • Fix(tests): Test relevant prereleases and allow to ignore releases
  • Fix(tracing): Move TRANSACTION_SOURCE_* constants to Enum (#3889) by @mgaligniana
  • Fix(typing): Add more typing info to Scope.update_from_kwargs's "contexts" (#4080)
  • Fix(typing): Set correct type for set_context everywhere (#4123) by @sentrivana
  • Chore(tests): Regenerate tox.ini (#4108) by @sentrivana
  • Build(deps): bump actions/create-github-app-token from 1.11.5 to 1.11.6 (#4113) by @dependabot
  • Build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0 (#4112) by @dependabot
Feb 17, 2025

Various fixes & improvements

  • New integration: Add Statsig integration (#4022) by @aliu39

    For more information, see the documentation for the StatsigIntegration.

  • Profiling: Continuous profiling lifecycle (#4017) by @Zylphrex

  • Fix: Revert "feat(tracing): Add propagate_traces deprecation warning (#3899)" (#4055) by @cmanallen

  • Tests: Generate Web 1 group tox entries by toxgen script (#3980) by @sentrivana

  • Tests: Generate Web 2 group tox entries by toxgen script (#3981) by @sentrivana

  • Tests: Generate Tasks group tox entries by toxgen script (#3976) by @sentrivana

  • Tests: Generate AI group tox entries by toxgen script (#3977) by @sentrivana

  • Tests: Generate DB group tox entries by toxgen script (#3978) by @sentrivana

  • Tests: Generate Misc group tox entries by toxgen script (#3982) by @sentrivana

  • Tests: Generate Flags group tox entries by toxgen script (#3974) by @sentrivana

  • Tests: Generate gRPC tox entries by toxgen script (#3979) by @sentrivana

  • Tests: Remove toxgen cutoff, add statsig (#4048) by @sentrivana

  • Tests: Reduce continuous profiling test flakiness (#4052) by @Zylphrex

  • Tests: Fix Clickhouse test (#4053) by @sentrivana

  • Tests: Fix flaky HTTPS test (#4057) by @Zylphrex

  • Update sample rate in DSC (#4018) by @sentrivana

  • Move the GraphQL group over to the tox gen script (#3975) by @sentrivana

  • Update changelog with profile_session_sample_rate (#4046) by @sentrivana

Feb 12, 2025

Various fixes & improvements

  • Fix incompatibility with new Strawberry version (#4026) by @sentrivana

  • Add failed_request_status_codes to Litestar (#4021) by @vrslev

    See https://docs.sentry.io/platforms/python/integrations/litestar/ for details.

  • Deprecate enable_tracing option (#3935) by @antonpirker

    The enable_tracing option is now deprecated. Please use traces_sample_rate instead. See https://docs.sentry.io/platforms/python/configuration/options/#traces_sample_rate for more information.

  • Explicitly use None default when checking metadata (#4039) by @mpurnell1

  • Fix bug where concurrent accesses to the flags property could raise a RuntimeError (#4034) by @cmanallen

  • Add more min versions of frameworks (#3973) by @sentrivana

  • Set level based on status code for HTTP client breadcrumbs (#4004) by @sentrivana

  • Don't set transaction status to error on sys.exit(0) (#4025) by @sentrivana

  • Continuous profiling sample rate (#4002) by @Zylphrex

    Set profile_session_sample_rate=1.0 in your init() to collect continuous profiles for 100% of profile sessions. See https://docs.sentry.io/platforms/python/profiling/#enable-continuous-profiling for more information.

  • Track and report spans that were dropped (#4005) by @constantinius

  • Change continuous profile buffer size (#3987) by @Zylphrex

  • Handle MultiPartParserError to avoid internal sentry crash (#4001) by @orhanhenrik

  • Handle None lineno in get_source_context (#3925) by @sentrivana

  • Add support for Python 3.12 and 3.13 to AWS Lambda integration (#3965) by @antonpirker

  • Add propagate_traces deprecation warning (#3899) by @mgaligniana

  • Check that __module__ is str (#3942) by @szokeasaurusrex

  • Add __repr__ to Baggage (#4043) by @szokeasaurusrex

  • Fix a typo (#3923) by @antonpirker

  • Fix various CI errors on master (#4009) by @Zylphrex

  • Split gevent tests off (#3964) by @sentrivana

  • Add tox generation script, but don't use it yet (#3971) by @sentrivana

  • Use httpx_mock in test_httpx (#3967) by @sl0thentr0py

  • Fix typo in test name (#4036) by @szokeasaurusrex

  • Fix mypy (#4019) by @sentrivana

  • Test Celery's latest RC (#3938) by @sentrivana

  • Bump actions/create-github-app-token from 1.11.2 to 1.11.3 (#4023) by @dependabot

  • Bump actions/create-github-app-token from 1.11.1 to 1.11.2 (#4015) by @dependabot

  • Bump codecov/codecov-action from 5.1.2 to 5.3.1 (#3995) by @dependabot

Jan 14, 2025
  • New integration: Add Typer integration (#3869) by @patrick91

    For more information, see the documentation for the TyperIntegration.

  • New integration: Add Unleash feature flagging integration (#3888) by @aliu39

    For more information, see the documentation for the UnleashIntegration.

  • Add custom tracking of feature flag evaluations (#3860) by @aliu39

  • Feature Flags: Register LD hook in setup instead of init, and don't check for initialization (#3890) by @aliu39

  • Feature Flags: Moved adding of flags context into Scope (#3917) by @antonpirker

  • Create a separate group for feature flag test suites (#3911) by @sentrivana

  • Fix flaky LaunchDarkly tests (#3896) by @aliu39

  • Fix LRU cache copying (#3883) by @ffelixg

  • Fix cache pollution from mutable reference (#3887) by @cmanallen

  • Centralize minimum version checking (#3910) by @sentrivana

  • Support SparkIntegration activation after SparkContext created (#3411) by @seyoon-lim

  • Preserve ARQ enqueue_job kwdefaults after patching (#3903) by @danmr

  • Add Github workflow to comment on issues when a fix was released (#3866) by @antonpirker

  • Update test matrix for Sanic (#3904) by @antonpirker

  • Rename scripts (#3885) by @sentrivana

  • Fix CI (#3878) by @sentrivana

  • Treat potel-base as release branch in CI (#3912) by @sentrivana

  • build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1 (#3893) by @dependabot

  • build(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1 (#3867) by @dependabot

  • build(deps): bump codecov/codecov-action from 5.1.1 to 5.1.2 (#3892) by @dependabot

Dec 6, 2024

Various fixes & improvements

  • Deepcopy and ensure get_all function always terminates (#3861) by @cmanallen
  • Cleanup chalice test environment (#3858) by @antonpirker
Dec 5, 2024

Various fixes & improvements

  • Fix errors when instrumenting Django cache (#3855) by @BYK
  • Copy scope.client reference as well (#3857) by @sl0thentr0py
  • Don't give up on Spotlight on 3 errors (#3856) by @BYK
  • Add missing stack frames (#3673) by @antonpirker
  • Fix wrong metadata type in async gRPC interceptor (#3205) by @fdellekart
  • Rename launch darkly hook to match JS SDK (#3743) by @aliu39
  • Script for checking if our instrumented libs are Python 3.13 compatible (#3425) by @antonpirker
  • Improve Ray tests (#3846) by @antonpirker
  • Test with Celery 5.5.0rc3 (#3842) by @sentrivana
  • Fix asyncio testing setup (#3832) by @sl0thentr0py
  • Bump codecov/codecov-action from 5.0.2 to 5.0.7 (#3821) by @dependabot
  • Fix CI (#3834) by @sentrivana
  • Use new ClickHouse GH action (#3826) by @antonpirker
Nov 21, 2024

Various fixes & improvements

  • New: introduce rust_tracing integration. See https://docs.sentry.io/platforms/python/integrations/rust_tracing/ (#3717) by @matt-codecov
  • Auto enable Litestar integration (#3540) by @provinzkraut
  • Deprecate sentry_sdk.init context manager (#3729) by @szokeasaurusrex
  • feat(spotlight): Send PII to Spotlight when no DSN is set (#3804) by @BYK
  • feat(spotlight): Add info logs when Sentry is enabled (#3735) by @BYK
  • feat(spotlight): Inject Spotlight button on Django (#3751) by @BYK
  • feat(spotlight): Auto enable cache_spans for Spotlight on DEBUG (#3791) by @BYK
  • fix(logging): Handle parameter stack_info for the LoggingIntegration (#3745) by @gmcrocetti
  • fix(pure-eval): Make sentry-sdk[pure-eval] installable with pip==24.0 (#3757) by @sentrivana
  • fix(rust_tracing): include_tracing_fields arg to control unvetted data in rust_tracing integration (#3780) by @matt-codecov
  • fix(aws) Fix aws lambda tests (by reducing event size) (#3770) by @antonpirker
  • fix(arq): fix integration with Worker settings as a dict (#3742) by @saber-solooki
  • fix(httpx): Prevent Sentry baggage duplication (#3728) by @szokeasaurusrex
  • fix(falcon): Don't exhaust request body stream (#3768) by @szokeasaurusrex
  • fix(integrations): Check retries_left before capturing exception (#3803) by @malkovro
  • fix(openai): Use name instead of description (#3807) by @sourceful-rob
  • test(gcp): Only run GCP tests when they should (#3721) by @szokeasaurusrex
  • chore: Shorten CI workflow names (#3805) by @sentrivana
  • chore: Test with pyspark prerelease (#3760) by @sentrivana
  • build(deps): bump codecov/codecov-action from 4.6.0 to 5.0.2 (#3792) by @dependabot
  • build(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#3691) by @dependabot
Nov 4, 2024

Various fixes & improvements

  • Add LaunchDarkly and OpenFeature integration (#3648) by @cmanallen
  • Correct typo in a comment (#3726) by @szokeasaurusrex
  • End http.client span on timeout (#3723) by @Zylphrex
  • Check for h2 existence in HTTP/2 transport (#3690) by @BYK
  • Use type() instead when extracting frames (#3716) by @Zylphrex
  • Prefer python_multipart import over multipart (#3710) by @musicinmybrain
  • Update active thread for asgi (#3669) by @Zylphrex
  • Only enable HTTP2 when DSN is HTTPS (#3678) by @BYK
  • Prepare for upstream Strawberry extension removal (#3649) by @DoctorJohn
  • Enhance README with improved clarity and developer-friendly examples (#3667) by @UTSAVS26
  • Run license compliance action on all PRs (#3699) by @szokeasaurusrex
  • Run CodeQL action on all PRs (#3698) by @szokeasaurusrex
  • Fix UTC assuming test (#3722) by @BYK
  • Exclude fakeredis 2.26.0 on py3.6 and 3.7 (#3695) by @szokeasaurusrex
  • Unpin pytest for tornado-latest tests (#3714) by @szokeasaurusrex
  • Install pytest-asyncio for redis tests (Python 3.12-13) (#3706) by @szokeasaurusrex
  • Clarify that only pinned tests are required (#3713) by @szokeasaurusrex
  • Remove accidentally-committed print (#3712) by @szokeasaurusrex
  • Disable broken RQ test in newly-released RQ 2.0 (#3708) by @szokeasaurusrex
  • Unpin pytest for celery tests (#3701) by @szokeasaurusrex
  • Unpin pytest on Python 3.8+ gevent tests (#3700) by @szokeasaurusrex
  • Unpin pytest for Python 3.8+ common tests (#3697) by @szokeasaurusrex
  • Remove pytest pin in requirements-devenv.txt (#3696) by @szokeasaurusrex
  • Test with Falcon 4.0 (#3684) by @sentrivana
Oct 17, 2024

Various fixes & improvements

  • Add support for async calls in Anthropic and OpenAI integration (#3497) by @vetyy
  • Allow custom transaction names in ASGI (#3664) by @sl0thentr0py
  • Langchain: Handle case when parent span wasn't traced (#3656) by @rbasoalto
  • Fix Anthropic integration when using tool calls (#3615) by @kwnath
  • More defensive Django Spotlight middleware injection (#3665) by @BYK
  • Remove ensure_integration_enabled_async (#3632) by @sentrivana
  • Test with newer Falcon version (#3644, #3653, #3662) by @sentrivana
  • Fix mypy (#3657) by @sentrivana
  • Fix flaky transport test (#3666) by @sentrivana
  • Remove pin on sphinx (#3650) by @sentrivana
  • Bump actions/checkout from 4.2.0 to 4.2.1 (#3651) by @dependabot
Oct 8, 2024

Integrations

  • Bottle: Add failed_request_status_codes (#3618) by @szokeasaurusrex

    You can now define a set of integers that will determine which status codes should be reported to Sentry.

    sentry_sdk.init(
        integrations=[
            BottleIntegration(
                failed_request_status_codes={403, *range(500, 600)},
            )
        ]
    )
    

    Examples of valid failed_request_status_codes:

    • {500} will only send events on HTTP 500.
    • {400, *range(500, 600)} will send events on HTTP 400 as well as the 5xx range.
    • {500, 503} will send events on HTTP 500 and 503.
    • set() (the empty set) will not send events for any HTTP status code.

    The default is {*range(500, 600)}, meaning that all 5xx status codes are reported to Sentry.

  • Bottle: Delete never-reached code (#3605) by @szokeasaurusrex

  • Redis: Remove flaky test (#3626) by @sentrivana

  • Django: Improve getting psycopg3 connection info (#3580) by @nijel

  • Django: Add SpotlightMiddleware when Spotlight is enabled (#3600) by @BYK

  • Django: Open relevant error when SpotlightMiddleware is on (#3614) by @BYK

  • Django: Support http_methods_to_capture in ASGI Django (#3607) by @sentrivana

    ASGI Django now also supports the http_methods_to_capture integration option. This is a configurable tuple of HTTP method verbs that should create a transaction in Sentry. The default is ("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",). OPTIONS and HEAD are not included by default.

    Here's how to use it:

    sentry_sdk.init(
        integrations=[
            DjangoIntegration(
                http_methods_to_capture=("GET", "POST"),
            ),
        ],
    )
    

Miscellaneous

  • Add 3.13 to setup.py (#3574) by @sentrivana
  • Add 3.13 to basepython (#3589) by @sentrivana
  • Fix type of sample_rate in DSC (and add explanatory tests) (#3603) by @antonpirker
  • Add httpcore based HTTP2Transport (#3588) by @BYK
  • Add opportunistic Brotli compression (#3612) by @BYK
  • Add __notes__ support (#3620) by @szokeasaurusrex
  • Remove useless makefile targets (#3604) by @antonpirker
  • Simplify tox version spec (#3609) by @sentrivana
  • Consolidate contributing docs (#3606) by @antonpirker
  • Bump codecov/codecov-action from 4.5.0 to 4.6.0 (#3617) by @dependabot
Oct 1, 2024

Integrations

  • Configure HTTP methods to capture in ASGI/WSGI middleware and frameworks (#3531) by @antonpirker

    We've added a new option to the Django, Flask, Starlette and FastAPI integrations called http_methods_to_capture. This is a configurable tuple of HTTP method verbs that should create a transaction in Sentry. The default is ("CONNECT", "DELETE", "GET", "PATCH", "POST", "PUT", "TRACE",). OPTIONS and HEAD are not included by default.

    Here's how to use it (substitute Flask for your framework integration):

    sentry_sdk.init(
        integrations=[
          FlaskIntegration(
              http_methods_to_capture=("GET", "POST"),
          ),
      ],
    )
    
    
  • Django: Allow ASGI to use drf_request in DjangoRequestExtractor (#3572) by @PakawiNz

  • Django: Don't let RawPostDataException bubble up (#3553) by @sentrivana

  • Django: Add sync_capable to SentryWrappingMiddleware (#3510) by @szokeasaurusrex

  • AIOHTTP: Add failed_request_status_codes (#3551) by @szokeasaurusrex

    You can now define a set of integers that will determine which status codes should be reported to Sentry.

    sentry_sdk.init(
        integrations=[
            AioHttpIntegration(
                failed_request_status_codes={403, *range(500, 600)},
            )
        ]
    )
    

    Examples of valid failed_request_status_codes:

    • {500} will only send events on HTTP 500.
    • {400, *range(500, 600)} will send events on HTTP 400 as well as the 5xx range.
    • {500, 503} will send events on HTTP 500 and 503.
    • set() (the empty set) will not send events for any HTTP status code.

    The default is {*range(500, 600)}, meaning that all 5xx status codes are reported to Sentry.

  • AIOHTTP: Delete test which depends on AIOHTTP behavior (#3568) by @szokeasaurusrex

  • AIOHTTP: Handle invalid responses (#3554) by @szokeasaurusrex

  • FastAPI/Starlette: Support new failed_request_status_codes (#3563) by @szokeasaurusrex

    The format of failed_request_status_codes has changed from a list of integers and containers to a set:

    sentry_sdk.init(
        integrations=StarletteIntegration(
            failed_request_status_codes={403, *range(500, 600)},
        ),
    )
    

    The old way of defining failed_request_status_codes will continue to work for the time being. Examples of valid new-style failed_request_status_codes:

    • {500} will only send events on HTTP 500.
    • {400, *range(500, 600)} will send events on HTTP 400 as well as the 5xx range.
    • {500, 503} will send events on HTTP 500 and 503.
    • set() (the empty set) will not send events for any HTTP status code.

    The default is {*range(500, 600)}, meaning that all 5xx status codes are reported to Sentry.

  • FastAPI/Starlette: Fix failed_request_status_codes=[] (#3561) by @szokeasaurusrex

  • FastAPI/Starlette: Remove invalid failed_request_status_code tests (#3560) by @szokeasaurusrex

  • FastAPI/Starlette: Refactor shared test parametrization (#3562) by @szokeasaurusrex

Miscellaneous

  • Deprecate sentry_sdk.metrics (#3512) by @szokeasaurusrex
  • Add name parameter to start_span() and deprecate description parameter (#3524 & #3525) by @antonpirker
  • Fix add_query_source with modules outside of project root (#3313) by @rominf
  • Test more integrations on 3.13 (#3578) by @sentrivana
  • Fix trailing whitespace (#3579) by @sentrivana
  • Improve get_integration typing (#3550) by @szokeasaurusrex
  • Make import-related tests stable (#3548) by @BYK
  • Fix breadcrumb sorting (#3511) by @sentrivana
  • Fix breadcrumb timestamp casting and its tests (#3546) by @BYK
  • Don't use deprecated logger.warn (#3552) by @sentrivana
  • Fix Cohere API change (#3549) by @BYK
  • Fix deprecation message (#3536) by @antonpirker
  • Remove experimental explain_plan feature. (#3534) by @antonpirker
  • X-fail one of the Lambda tests (#3592) by @antonpirker
  • Update Codecov config (#3507) by @antonpirker
  • Update actions/upload-artifact to v4 with merge (#3545) by @joshuarli
  • Bump actions/checkout from 4.1.7 to 4.2.0 (#3585) by @dependabot
Sep 9, 2024

Various fixes & improvements

  • New SysExitIntegration (#3401) by @szokeasaurusrex

    For more information, see the documentation for the SysExitIntegration.

  • Add SENTRY_SPOTLIGHT env variable support (#3443) by @BYK

  • Support Strawberry 0.239.2 (#3491) by @szokeasaurusrex

  • Add separate pii_denylist to EventScrubber and run it always (#3463) by @sl0thentr0py

  • Celery: Add wrapper for Celery().send_task to support behavior as Task.apply_async (#2377) by @divaltor

  • Django: SentryWrappingMiddleware.init fails if super() is object (#2466) by @cameron-simpson

  • Fix data_category for sessions envelope items (#3473) by @sl0thentr0py

  • Fix non-UTC timestamps (#3461) by @szokeasaurusrex

  • Remove obsolete object as superclass (#3480) by @sentrivana

  • Replace custom TYPE_CHECKING with stdlib typing.TYPE_CHECKING (#3447) by @dev-satoshi

  • Refactor tracing_utils.py (#3452) by @rominf

  • Explicitly export symbol in subpackages instead of ignoring (#3400) by @hartungstenio

  • Better test coverage reports (#3498) by @antonpirker

  • Fixed config for old coverage versions (#3504) by @antonpirker

  • Fix AWS Lambda tests (#3495) by @antonpirker

  • Remove broken Bottle tests (#3505) by @sentrivana

Aug 13, 2024

Various fixes & improvements

  • New integration: Ray (#2400) (#2444) by @glowskir

    Usage: (add the RayIntegration to your sentry_sdk.init() call and make sure it is called in the worker processes)

    import ray
    
    import sentry_sdk
    from sentry_sdk.integrations.ray import RayIntegration
    
    def init_sentry():
        sentry_sdk.init(
            dsn="...",
            traces_sample_rate=1.0,
            integrations=[RayIntegration()],
        )
    
    init_sentry()
    
    ray.init(
        runtime_env=dict(worker_process_setup_hook=init_sentry), 
    )
    

    For more information, see the documentation for the Ray integration.

  • New integration: Litestar (#2413) (#3358) by @KellyWalker

    Usage: (add the LitestarIntegration to your sentry_sdk.init())

    from litestar import Litestar, get
    
    import sentry_sdk
    from sentry_sdk.integrations.litestar import LitestarIntegration
    
    sentry_sdk.init(
        dsn="...",
        traces_sample_rate=1.0,
        integrations=[LitestarIntegration()],
    )
    
    @get("/")
    async def index() -> str:
        return "Hello, world!"
    
    app = Litestar(...)
    

    For more information, see the documentation for the Litestar integration.

  • New integration: Dramatiq from @jacobsvante (#3397) by @antonpirker Usage: (add the DramatiqIntegration to your sentry_sdk.init())

    import dramatiq
    
    import sentry_sdk
    from sentry_sdk.integrations.dramatiq import DramatiqIntegration
    
    sentry_sdk.init(
        dsn="...",
        traces_sample_rate=1.0,
        integrations=[DramatiqIntegration()],
    )
    
    @dramatiq.actor(max_retries=0)
    def dummy_actor(x, y):
        return x / y
    
    dummy_actor.send(12, 0)
    

    For more information, see the documentation for the Dramatiq integration.

  • New config option: Expose custom_repr function that precedes safe_repr invocation in serializer (#3438) by @sl0thentr0py

    See: https://docs.sentry.io/platforms/python/configuration/options/#custom-repr

  • Profiling: Add client SDK info to profile chunk (#3386) by @Zylphrex

  • Serialize vars early to avoid living references (#3409) by @sl0thentr0py

  • Deprecate hub-based sessions.py logic (#3419) by @szokeasaurusrex

  • Deprecate is_auto_session_tracking_enabled (#3428) by @szokeasaurusrex

  • Add note to generated yaml files (#3423) by @sentrivana

  • Slim down PR template (#3382) by @sentrivana

  • Use new banner in readme (#3390) by @sentrivana

Jul 31, 2024

Various fixes & improvements

  • API: Expose the scope getters to top level API and use them everywhere (#3357) by @sl0thentr0py
  • API: push_scope deprecation warning (#3355) (#3355) by @szokeasaurusrex
  • API: Replace push_scope (#3353, #3354) by @szokeasaurusrex
  • API: Deprecate, avoid, or stop using configure_scope (#3348, #3349, #3350, #3351) by @szokeasaurusrex
  • OTel: Remove experimental autoinstrumentation (#3239) by @sentrivana
  • Graphene: Add span for grapqhl operation (#2788) by @czyber
  • AI: Add async support for ai_track decorator (#3376) by @czyber
  • CI: Workaround bug preventing Django test runs (#3371) by @szokeasaurusrex
  • CI: Remove Django setuptools pin (#3378) by @szokeasaurusrex
  • Tests: Test with Django 5.1 RC (#3370) by @sentrivana
  • Broaden add_attachment type (#3342) by @szokeasaurusrex
  • Add span data to the transactions trace context (#3374) by @antonpirker
  • Gracefully fail attachment path not found case (#3337) by @sl0thentr0py
  • Document attachment parameters (#3342) by @szokeasaurusrex
  • Bump checkouts/data-schemas from 0feb234 to 6d2c435 (#3369) by @dependabot
  • Bump checkouts/data-schemas from 88273a9 to 0feb234 (#3252) by @dependabot
Jul 26, 2024

This is a security backport release.

Jul 24, 2024

Various fixes & improvements

  • Add disabled_integrations (#3328) by @sentrivana

    Disabling individual integrations is now much easier. Instead of disabling all automatically enabled integrations and specifying the ones you want to keep, you can now use the new disabled_integrations config option to provide a list of integrations to disable:

    import sentry_sdk
    from sentry_sdk.integrations.flask import FlaskIntegration
    
    sentry_sdk.init(
        # Do not use the Flask integration even if Flask is installed.
        disabled_integrations=[
            FlaskIntegration(),
        ],
    )
    
  • Use operation name as transaction name in Strawberry (#3294) by @sentrivana

  • WSGI integrations respect SCRIPT_NAME env variable (#2622) by @sarvaSanjay

  • Make Django DB spans have origin auto.db.django (#3319) by @antonpirker

  • Sort breadcrumbs by time before sending (#3307) by @antonpirker

  • Fix KeyError('sentry-monitor-start-timestamp-s') (#3278) by @Mohsen-Khodabakhshi

  • Set MongoDB tags directly on span data (#3290) by @0Calories

  • Lower logger level for some messages (#3305) by @sentrivana and @antonpirker

  • Emit deprecation warnings from Hub API (#3280) by @szokeasaurusrex

  • Clarify that instrumenter is internal-only (#3299) by @szokeasaurusrex

  • Support Django 5.1 (#3207) by @sentrivana

  • Remove apparently unnecessary if (#3298) by @szokeasaurusrex

  • Preliminary support for Python 3.13 (#3200) by @sentrivana

  • Move sentry_sdk.init out of hub.py (#3276) by @szokeasaurusrex

  • Unhardcode integration list (#3240) by @rominf

  • Allow passing of PostgreSQL port in tests (#3281) by @rominf

  • Add tests for @ai_track decorator (#3325) by @colin-sentry

  • Do not include type checking code in coverage report (#3327) by @antonpirker

  • Fix test_installed_modules (#3309) by @szokeasaurusrex

  • Fix typos and grammar in a comment (#3293) by @szokeasaurusrex

  • Fixed failed tests setup (#3303) by @antonpirker

  • Only assert warnings we are interested in (#3314) by @szokeasaurusrex

Latest
2.58.0
Tracking Since
Jul 6, 2021
Last checked Apr 20, 2026