# Instrumenting Python Futures calls

**URL:** <https://discuss.elastic.co/t/instrumenting-python-futures-calls/148194>\
**Category:** APM\
**Created:** [September 11, 2018, 5:43pm UTC](https://discuss.elastic.co/t/instrumenting-python-futures-calls/148194 "2018-09-11T17:43:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug\_shareablee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doug_shareablee/32/35436_2.png) [@doug\_shareablee](https://discuss.elastic.co/u/doug_shareablee)\
**Post date:** [September 11, 2018, 5:43pm UTC](https://discuss.elastic.co/t/instrumenting-python-futures-calls/148194/1 "2018-09-11T17:43:08Z")

</div>

Hi,

I'm setting up Elastic APM, and I'm finding that that futures are not instrumented. For example, we make sure database calls inside functions that are executed with futures. We're using the ThreadPoolExecutor.

It doesn't look like there's an additional option to enable instrumentation for futures. Is there anything else to do?

I did look at some other products. Datadog has this: [https://github.com/DataDog/dd-trace-py/blob/a233b568fa45e6e02654c88c98d5ad6104fa935c/ddtrace/contrib/futures/threading.py](https://github.com/DataDog/dd-trace-py/blob/a233b568fa45e6e02654c88c98d5ad6104fa935c/ddtrace/contrib/futures/threading.py) It's not obvious how that might translate to something that can be used in this framework.

-Doug

---

<div class="post-metadata">

**Author:** ![beniwohli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beniwohli/32/21256_2.png) [@beniwohli](https://discuss.elastic.co/u/beniwohli)\
**Post date:** [September 13, 2018, 8:07am UTC](https://discuss.elastic.co/t/instrumenting-python-futures-calls/148194/2 "2018-09-13T08:07:57Z")

</div>

Hi Doug

adding support for asynchronous and threaded programming is something we are investigating on how to best support, but it's not something we can do currently. Unfortunately, I can't provide a timeline for when we will add support.

Cheers  
Beni

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 4, 2018, 4:14am UTC](https://discuss.elastic.co/t/instrumenting-python-futures-calls/148194/3 "2018-10-04T04:14:28Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
