plainx-sentry 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,10 +66,9 @@ class SentryMiddleware:
66
66
 
67
67
  return event
68
68
 
69
- with sentry_sdk.configure_scope() as scope:
70
- # Reset the scope (and breadcrumbs) for each request
71
- scope.clear()
72
- scope.add_event_processor(event_processor)
69
+ # Reset the scope (and breadcrumbs) for each request
70
+ scope = sentry_sdk.get_isolation_scope()
71
+ scope.add_event_processor(event_processor)
73
72
 
74
73
  # Sentry's Django integration patches the WSGIHandler.
75
74
  # We could make our own WSGIHandler and patch it or call it directly from gunicorn,
@@ -119,10 +118,9 @@ class SentryWorkerMiddleware:
119
118
  extra["plain.worker"] = {"job": job.as_json()}
120
119
  return event
121
120
 
122
- with sentry_sdk.configure_scope() as scope:
123
- # Reset the scope (and breadcrumbs) for each job
124
- scope.clear()
125
- scope.add_event_processor(event_processor)
121
+ # Reset the scope (and breadcrumbs) for each job
122
+ scope = sentry_sdk.get_isolation_scope()
123
+ scope.add_event_processor(event_processor)
126
124
 
127
125
  with sentry_sdk.start_transaction(
128
126
  op="plain.worker.job",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plainx-sentry
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Author-email: Dave Gaeddert <dave.gaeddert@gmail.com>
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: sentry-sdk>=1.8.0
@@ -1,9 +1,9 @@
1
1
  plainx/sentry/__init__.py,sha256=Klz3mH_itM2RXzJ_sWWJRIoZcS0jCRxWrhVVIPsG5FY,123
2
2
  plainx/sentry/config.py,sha256=EwMnY3DaanIGkgtKD_4h8ncx6MH_MxOML8BF5Hx5GBA,723
3
3
  plainx/sentry/default_settings.py,sha256=DNX6OQ0-BqfjyWuszW7JnZhiDn0tGtS3Fa2W7VbTIF8,564
4
- plainx/sentry/middleware.py,sha256=tw2ZMBRfH7eze0ZDqxo-meLSOaD2lVUSBYC99z5izZs,5597
4
+ plainx/sentry/middleware.py,sha256=SuvDu6o7_C_LRA4MB1K5tFYxfR5iOD8SpTh2MqMbIvU,5523
5
5
  plainx/sentry/templates.py,sha256=YovKIswcsjLRjHdmRzdaxG1PHjGfz8fc5TeNE9wcYQA,2046
6
6
  plainx/sentry/templates/sentry/js.html,sha256=aOjWAwuUaecGbC-5yZWP1aaGyYAcM-GK0dru-4VOYoE,491
7
- plainx_sentry-0.3.0.dist-info/METADATA,sha256=o15WLvI7N7Rq4sxqujNbM5_XUAreCd71bixd54f2GJo,1558
8
- plainx_sentry-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- plainx_sentry-0.3.0.dist-info/RECORD,,
7
+ plainx_sentry-0.3.1.dist-info/METADATA,sha256=9AfTtCMOwQdfBoDdLoXmcO1yQtK1soLsHh2V0eIpePE,1558
8
+ plainx_sentry-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ plainx_sentry-0.3.1.dist-info/RECORD,,