I am trying to capture some spans in my Python Flask app using the decorator:
@elasticapm.capture_span()
This works perfectly, until I execute a couple of functions in parallel using python's multiprocessing module. These spans are then never captured (the spans set in the main process are still captured). Within these functions, I am also not able to send an error or message (apm.capture_message()).
I use multiprocessing.Process and multiprocessing.Pipe to parallelize the execution of a list of functions.
I would love for each of these functions to be captured as individual spans within the request transaction.
Does anyone have experience with capturing parallel spans using Flask and Elastic APM?