1.45.0
This is the final 1.x release for the forseeable future. Development will continue on the 2.x release line. The first 2.x version will be available in the next few weeks.
Various fixes & improvements
-
Allow to upsert monitors (#2929) by @sentrivana
It's now possible to provide
monitor_configto themonitordecorator/context manager directly:from sentry_sdk.crons import monitor # All keys except `schedule` are optional monitor_config = { "schedule": {"type": "crontab", "value": "0 0 * * *"}, "timezone": "Europe/Vienna", "checkin_margin": 10, "max_runtime": 10, "failure_issue_threshold": 5, "recovery_threshold": 5, } @monitor(monitor_slug='<monitor-slug>', monitor_config=monitor_config) def tell_the_world(): print('My scheduled task...')
Check out the cron docs for details.
-
Add Django
signals_denylistto filter signals that are attached to bysignals_spans(#2758) by @lieryanIf you want to exclude some Django signals from performance tracking, you can use the new
signals_denylistDjango option:import django.db.models.signals import sentry_sdk sentry_sdk.init( ... integrations=[ DjangoIntegration( ... signals_denylist=[ django.db.models.signals.pre_init, django.db.models.signals.post_init, ], ), ], )
-
incrementfor metrics (#2588) by @mitsuhikoincrementandincrare equivalent, so you can pick whichever you like more. -
Add
value,unittobefore_emit_metric(#2958) by @sentrivanaIf you add a custom
before_emit_metric, it'll now accept 4 arguments (thekey,value,unitandtags) instead of justkeyandtags.def before_emit(key, value, unit, tags): if key == "removed-metric": return False tags["extra"] = "foo" del tags["release"] return True sentry_sdk.init( ... _experiments={ "before_emit_metric": before_emit, } )
-
Remove experimental metric summary options (#2957) by @sentrivana
The
_experimentsoptionsmetrics_summary_sample_rateandshould_summarize_metrichave been removed. -
New normalization rules for metric keys, names, units, tags (#2946) by @sentrivana
-
Change
data_categoryfromstatsdtometric_bucket(#2954) by @cleptric -
Accessing
__mro__might throw aValueError(#2952) by @sentrivana -
Suppress prompt spawned by subprocess when using
pythonw(#2936) by @collinbanko -
Do not send "quiet" Sanic exceptions to Sentry (#2821) by @hamedsh
-
Fix type hints for
monitordecorator (#2944) by @szokeasaurusrex -
Remove deprecated
typingimports in crons (#2945) by @szokeasaurusrex -
Make
monitor_configaTypedDict(#2931) by @sentrivana -
Add
devenv-requirements.txtand update env setup instructions (#2761) by @arr-ee -
Bump
types-protobuffrom4.24.0.20240311to4.24.0.20240408(#2941) by @dependabot -
Disable Codecov check run annotations (#2537) by @eliatcodecov