Releases: getsentry/sentry-python
1.24.0
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_taskswhen creatingCeleryIntegration. 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-aand all tasks with a name starting withpayment-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.metadataoverpkg_resourcesif 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
1.23.1
Various fixes & improvements
- Disable Django Cache spans by default. (#2120) by @antonpirker
1.23.0
Various fixes & improvements
-
New: Add
loguruintegration (#1994) by @PerchunPakCheck the documentation for more information.
Usage:
from loguru import logger import sentry_sdk from sentry_sdk.integrations.loguru import LoguruIntegration sentry_sdk.init( dsn="___PUBLIC_DSN___", integrations=[ LoguruIntegration(), ], ) logger.debug("I am ignored") logger.info("I am a breadcrumb") logger.error("I am an event", extra=dict(bar=43)) logger.exception("An exception happened")
- An error event with the message
"I am an event"will be created. "I am a breadcrumb"will be attached as a breadcrumb to that event.barwill end up in theextraattributes of that event."An exception happened"will send the current exception fromsys.exc_info()with the stack trace to Sentry. If there's no exception, the current stack will be attached.- The debug message
"I am ignored"will not be captured by Sentry. To capture it, setleveltoDEBUGor lower inLoguruIntegration.
- An error event with the message
-
Do not truncate request body if
request_bodiesis"always"(#2092) by @sentrivana -
Fixed Celery headers for Beat auto-instrumentation (#2102) by @antonpirker
-
Add
db.operationto Redis and MongoDB spans (#2089) by @antonpirker -
Make sure we're importing
redisthe library (#2106) by @sentrivana -
Add
include_source_contextoption (#2020) by @farhat-nawaz and @sentrivana -
Import
Markupfrommarkupsafe(#2047) by @rco-ableton -
Fix
__qualname__missing attribute in asyncio integration (#2105) by @sl0thentr0py -
Remove relay extension from AWS Layer (#2068) by @sl0thentr0py
-
Add a note about
pip freezeto the bug template (#2103) by @sentrivana
1.22.2
Various fixes & improvements
- Fix: Django caching spans when using keyword arguments (#2086) by @antonpirker
- Fix: Duration in Celery Beat tasks monitoring (#2087) by @antonpirker
- Fix: Docstrings of SPANDATA (#2084) by @antonpirker
1.22.1
Various fixes & improvements
- Fix: Handle a list of keys (not just a single key) in Django cache spans (#2082) by @antonpirker
1.22.0
Various fixes & improvements
-
Add
cache.hitandcache.item_sizeto Django (#2057) by @antonpirkerNote: This will add spans for all requests to the caches configured in Django. This will probably add some overhead to your server an also add multiple spans to your performance waterfall diagrams. If you do not want this, you can disable this feature in the DjangoIntegration:
sentry_sdk.init( dsn="...", integrations=[ DjangoIntegration(cache_spans=False), ] )
-
Use
http.methodinstead ofmethod(#2054) by @AbhiPrasad -
Handle non-int
exc.status_codein Starlette (#2075) by @sentrivana -
Handle SQLAlchemy
engine.namebeing bytes (#2074) by @sentrivana -
Fix
KeyErrorincapture_checkinif SDK is not initialized (#2073) by @antonpirker -
Use
functools.wrapforThreadingIntegrationpatches to fix attributes (#2080) by @EpicWink -
Pin
urllib3to <2.0.0 for now (#2069) by @sl0thentr0py
1.21.1
Various fixes & improvements
- Do not send monitor_config when unset (#2058) by @evanpurkhiser
- Add
db.systemspan data (#2040, #2042) by @antonpirker - Fix memory leak in profiling (#2049) by @Zylphrex
- Fix crash loop when returning none in before_send (#2045) by @sentrivana
1.21.0
Various fixes & improvements
-
Better handling of redis span/breadcrumb data (#2033) by @antonpirker
Note: With this release we will limit the description of redis db spans and the data in breadcrumbs represting redis db operations to 1024 characters.
This can can lead to truncated data. If you do not want this there is a new parameter
max_data_sizeinRedisIntegration. You can set this toNonefor disabling trimming.Example for disabling trimming of redis commands in spans or breadcrumbs:
sentry_sdk.init( integrations=[ RedisIntegration(max_data_size=None), ] )
Example for custom trim size of redis commands in spans or breadcrumbs:
sentry_sdk.init( integrations=[ RedisIntegration(max_data_size=50), ] )`
-
Add
db.systemto redis and SQLAlchemy db spans (#2037, #2038, #2039) (#2037) by @AbhiPrasad -
Upgraded linting tooling (#2026) by @antonpirker
-
Made code more resilient. (#2031) by @antonpirker
1.20.0
Various fixes & improvements
-
Send all events to /envelope endpoint when tracing is enabled (#2009) by @antonpirker
Note: If you’re self-hosting Sentry 9, you need to stay in the previous version of the SDK or update your self-hosted to at least 20.6.0
-
Profiling: Remove profile context from SDK (#2013) by @Zylphrex
-
Profiling: Additionl performance improvements to the profiler (#1991) by @Zylphrex
-
Fix: Celery Beat monitoring without restarting the Beat process (#2001) by @antonpirker
-
Fix: Using the Codecov uploader instead of deprecated python package (#2011) by @antonpirker
-
Fix: Support for Quart (#2003)` (#2003) by @antonpirker
1.19.1
Various fixes & improvements
- Make auto monitoring beat update support Celery 4 and 5 (#1989) by @antonpirker