File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
sentry_sdk/integrations/celery Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,14 @@ def apply_async(*args, **kwargs):
168
168
# type: (*Any, **Any) -> Any
169
169
task = args [0 ]
170
170
171
+ from pprint import pprint
172
+
173
+ print ("######### args (producer) #############" )
174
+ pprint (args )
175
+ print ("######### kwargs (producer) #############" )
176
+ pprint (kwargs )
177
+ # TODO: this is the producer side. here we can add data from args/kwargs to the span.
178
+
171
179
# Do not create a span when the task is a Celery Beat task
172
180
# (Because we do not have a transaction in that case)
173
181
span_mgr = (
@@ -272,6 +280,15 @@ def _wrap_tracer(task, f):
272
280
def _inner (* args , ** kwargs ):
273
281
# type: (*Any, **Any) -> Any
274
282
with isolation_scope () as scope :
283
+ from pprint import pprint
284
+
285
+ print ("######### args (consumer) #############" )
286
+ pprint (args )
287
+ print ("######### kwargs (consumer) #############" )
288
+ pprint (kwargs )
289
+ # TODO: this is where the consumer picks up the task and processes it.
290
+ # in the args you find a lot of information about the task that can be added to the transaction
291
+
275
292
scope ._name = "celery"
276
293
scope .clear_breadcrumbs ()
277
294
scope .add_event_processor (_make_event_processor (task , * args , ** kwargs ))
You can’t perform that action at this time.
0 commit comments