This commit is contained in:
@@ -19,7 +19,7 @@ from magic_doer import MagicDoer
|
||||
|
||||
|
||||
def message_callback(channel, method, properties, body):
|
||||
with opentracing.tracer.start_span('messageHandling') as span:
|
||||
with opentracing.tracer.start_active_span('messageHandling', finish_on_close=True) as span:
|
||||
try:
|
||||
msg = json.loads(body.decode('utf-8'))
|
||||
except (UnicodeDecodeError, json.JSONDecodeError) as e:
|
||||
@@ -28,8 +28,8 @@ def message_callback(channel, method, properties, body):
|
||||
|
||||
span.log_kv({'event': 'messageParsed', 'sampleTag': msg['tag']})
|
||||
|
||||
with opentracing.tracer.start_span('runAlgorithm', child_of=span) as child_span:
|
||||
results = MagicDoer.run_everything(msg, child_span) # <- This is where the magic happens
|
||||
with opentracing.tracer.start_active_span('runAlgorithm', child_of=span) as child_span:
|
||||
results = MagicDoer.run_everything(msg) # <- This is where the magic happens
|
||||
|
||||
if results:
|
||||
channel.basic_publish(
|
||||
|
||||
Reference in New Issue
Block a user