|
11 | 11 | ) |
12 | 12 |
|
13 | 13 | from sentry_sdk.hub import Hub |
14 | | -from sentry_sdk.serializer import partial_serialize |
15 | 14 | from sentry_sdk.utils import capture_internal_exceptions, event_from_exception |
16 | 15 | from sentry_sdk.tracing import Span |
17 | 16 | from sentry_sdk._compat import reraise |
@@ -161,27 +160,22 @@ def _make_event_processor(task, uuid, args, kwargs, request=None): |
161 | 160 | # type: (Any, Any, Any, Any, Optional[Any]) -> EventProcessor |
162 | 161 | def event_processor(event, hint): |
163 | 162 | # type: (Event, Hint) -> Optional[Event] |
164 | | - client = Hub.current.client |
165 | 163 |
|
166 | 164 | with capture_internal_exceptions(): |
167 | 165 | extra = event.setdefault("extra", {}) |
168 | | - extra["celery-job"] = partial_serialize( |
169 | | - client, |
170 | | - {"task_name": task.name, "args": args, "kwargs": kwargs}, |
171 | | - should_repr_strings=False, |
172 | | - ) |
| 166 | + extra["celery-job"] = { |
| 167 | + "task_name": task.name, |
| 168 | + "args": args, |
| 169 | + "kwargs": kwargs, |
| 170 | + } |
173 | 171 |
|
174 | 172 | if "exc_info" in hint: |
175 | 173 | with capture_internal_exceptions(): |
176 | 174 | if issubclass(hint["exc_info"][0], SoftTimeLimitExceeded): |
177 | 175 | event["fingerprint"] = [ |
178 | 176 | "celery", |
179 | 177 | "SoftTimeLimitExceeded", |
180 | | - partial_serialize( |
181 | | - client, |
182 | | - getattr(task, "name", task), |
183 | | - should_repr_strings=False, |
184 | | - ), |
| 178 | + getattr(task, "name", task), |
185 | 179 | ] |
186 | 180 |
|
187 | 181 | return event |
|
0 commit comments