Skip to content

Releases: getsentry/sentry-python

1.37.1

24 Nov 15:28
Compare
Choose a tag to compare

Various fixes & improvements

1.37.0

24 Nov 10:28
a059f34
Compare
Choose a tag to compare

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

1.36.0

21 Nov 10:53
89ba92a
Compare
Choose a tag to compare

1.35.0

13 Nov 11:06
1e72ef8
Compare
Choose a tag to compare

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

1.34.0

02 Nov 14:57
bcb9c87
Compare
Choose a tag to compare

Various fixes & improvements

1.33.1

31 Oct 16:00
Compare
Choose a tag to compare

Various fixes & improvements

1.33.0

31 Oct 12:04
83bf819
Compare
Choose a tag to compare

Various fixes & improvements

1.32.0

11 Oct 09:20
Compare
Choose a tag to compare

Various fixes & improvements

1.31.0

13 Sep 11:09
6935ba2
Compare
Choose a tag to compare

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

1.30.0

29 Aug 13:46
Compare
Choose a tag to compare

Various fixes & improvements

  • Officially support Python 3.11 (#2300) by @sentrivana

  • Context manager monitor (#2290) by @szokeasaurusrex

  • Set response status code in transaction response context. (#2312) by @antonpirker

  • Add missing context kwarg to _sentry_task_factory (#2267) by @JohnnyDeuss

  • In Postgres take the connection params from the connection (#2308) by @antonpirker

  • Experimental: Allow using OTel for performance instrumentation (#2272) by @sentrivana

    This release includes experimental support for replacing Sentry's default
    performance monitoring solution with one powered by OpenTelemetry without having
    to do any manual setup.

    Try it out by installing pip install sentry-sdk[opentelemetry-experimental] and
    then initializing the SDK with:

    sentry_sdk.init(
        # ...your usual options...
        _experiments={"otel_powered_performance": True},
    )

    This enables OpenTelemetry performance monitoring support for some of the most
    popular frameworks and libraries (Flask, Django, FastAPI, requests...).

    We're looking forward to your feedback! Please let us know about your experience
    in this discussion: getsentry/sentry#55023

    Important note: Please note that this feature is experimental and in a
    proof-of-concept stage and is not meant for production use. It may be changed or
    removed at any point.

  • Enable backpressure handling by default (#2298) by @sl0thentr0py

    The SDK now dynamically downsamples transactions to reduce backpressure in high
    throughput systems. It starts a new Monitor thread to perform some health checks
    which decide to downsample (halved each time) in 10 second intervals till the system
    is healthy again.

    To disable this behavior, use:

    sentry_sdk.init(
        # ...your usual options...
        enable_backpressure_handling=False,
    )

    If your system serves heavy load, please let us know how this feature works for you!
    Check out the documentation for more information.

  • Stop recording spans for internal web requests to Sentry (#2297) by @szokeasaurusrex

  • Add test for ThreadPoolExecutor (#2259) by @gggritso

  • Add docstrings for Scope.update_from_* (#2311) by @sentrivana

  • Moved is_sentry_url to utils (#2304) by @szokeasaurusrex

  • Fix: arq attribute error on settings, support worker args (#2260) by @rossmacarthur

  • Fix: Exceptions include detail property for their value (#2193) by @nicolassanmar

  • build(deps): bump mypy from 1.4.1 to 1.5.1 (#2319) by @dependabot

  • build(deps): bump sphinx from 7.1.2 to 7.2.4 (#2322) by @dependabot

  • build(deps): bump sphinx from 7.0.1 to 7.1.2 (#2296) by @dependabot

  • build(deps): bump checkouts/data-schemas from 1b85152 to ebc77d3 (#2254) by @dependabot