Feature Idea: Support for Python 3 Asyncio ioloop ETA

I found 2 topics tagged with asyncio but none of them brings any clue of the asyncio support. https://discuss.newrelic.com/tags/asyncio

Is in your plans to support the asyncio ioloop? any ETA?

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


I found 2 topics tagged with asyncio but none of them brings any clue of the asyncio support. https://discuss.newrelic.com/tags/asyncio

Is in your plans to support the asyncio ioloop? any ETA?

Hi there, @dmo! I saw that this was posted twice so I went ahead and merged them together for you.

As for your Asyncio request, I do not have an ETA to share at this time. I am happy to create a feature request for this and pass your input along to my Product Managers. If you would like to provide any more details, feel free to update this thread. Thanks! :blush:

Hi @Linds Thanks for your quickly reply.

I have to say that I felt a bit frustrated when I noticed that asyncio is not yet in your roadmap. Is annoying that a service that I like doesn’t support the platform that I love. But I know that this platform is not widely used yet, so I completely understand.

I’ve been a bit busy lately but found some time on the weekend to perform a research on the matter and I’m happy to let you know that I built a python package that collects metrics from an asyncio program.

The package can be found at https://github.com/dmonroy/aiometrics

I know that the python agent does more than function traces, but I’m hoping that my contribution is going to help with the approval of the feature request.


1 Like

Wow, @dmo! Thank you for sharing! What a cool repo—I only took a quick peek but I am sure that this will help out other community members who share in your thoughts on New Relic supporting Asyncio.

Thanks for understanding and for sharing your thoughts here. I am going to update your feature request so my product managers can see the efforts going out towards Asyncio support. :thumbsup:

If anyone uses the package that @dmo shared, please update us here!

Thanks @Linds, please keep us (me for now) updated on the status of the feature request.

If I can provide anything else, please let me know :slight_smile:

1 Like

Any news on this? It’s been a few month and I see a lot of people moving into python 3.5 and asyncio - we would love to use NewRelic for major deployments using this stack in near future but, so far no ETA on this one:(

Thanks for sharing @moodly. I updated this to our new Feature Idea process to make sure it gets back in front of the product team. Although I can not comment on the product roadmap right now, I know they appreciate the feedback.

If anyone is interested, I created a NR plugin for asyncio using aiometrics… is not that powerful as the NR agent for non-asyncio python applications, but at least it provides basic transaction metrics.

1 Like

@Linds @hross any news on this feature? It has been here for long time without an update and more people seems to be interested.

No news to share right now, @dmo. Sorry I don’t have an update to share, but you are right: 10 votes so far is not a bad start at all! Our Product Managers are keeping their eyes on this so please check back for updates soon! Thanks :blush:

How about now? This is beginning to be a fundamental question for any new python projects that go after a micro-service infrastructure.

1 Like

I’ve been using new relic since 2013 and always require to have it on every new project I join. Most of the projects were in php, nodejs, golang and Java. So the experience was excellent. Recently I joined a new company, which is a Python shop, and I was surprised with the state of new relic python agents.

Nothing outside of plain 2.7 sync frameworks is supported.

  • Tornado 4.0 wrappers are outdated and crash on latest Motor
  • No support for python’s async io.

We are blocked and now I’m looking for the alternatives.

Please don’t make me switch to another vendor. I love new relic and want to use it but I can’t.

Even the simplest alpha version for asyncio and latest Tornado will be a huge relief!

1 Like

Hi avystosky, thanks for the feedback. Support for asynci.io is on our roadmap. When we started work on async framework support in our Python agent, we had a choice to make. We prioritized Tornado 4 over asynci.io based on customer feedback. The good news is that much of the foundational work we are doing there also moves us forward on async.io support. Before tackling other async technologies/frameworks, we’re working to wrap up full support for cross application tracing for Tornado 4 as well as delivery of some additional improvements based on customer feedback.

Regarding the issue with the instrumentation of Motor, can you provide the exact version of Tornado 4 and Motor that you are using so we can investigate further? Note that if you are using Tornado 4.0, as mentioned in our tornado 4 docs, the earliest release of Tornado 4 we support is 4.1.

1 Like

Hi @avysotsky,

Thanks for reaching out about motor instrumentation issues.

If you’re receiving the following error from the New Relic agent, the error can be safely ignored:

newrelic.config ERROR - Type = import-hook
newrelic.config ERROR - Locals = {'function': 'patch_motor', 'instrumented': set([('newrelic.hooks.datastore_motor', 'patch_motor')]), 'target': <module 'motor' from '.../site-packages/motor/__init__.pyc'>, 'module': 'newrelic.hooks.datastore_motor'}
newrelic.config ERROR - Exception Details
Traceback (most recent call last):
  File "newrelic/config.py", line 1017, in _instrument
  File "newrelic/hooks/datastore_motor.py", line 24, in patch_motor
  File "newrelic/common/object_wrapper.py", line 264, in wrap_function_wrapper
    return wrap_object(module, name, FunctionWrapper, (wrapper,))
  File "newrelic/common/object_wrapper.py", line 208, in wrap_object
    (parent, attribute, original) = resolve_path(module, name)
  File "newrelic/common/object_wrapper.py", line 172, in resolve_path
    original = getattr(parent, attribute)
AttributeError: 'module' object has no attribute 'MotorClient'

The error above is a known issue that we expect will be fixed on our next agent release.

Temporarily, it should be safe to disable that instrumentation hook by adding the following to your newrelic.ini file:

enabled = false

If the error you’re seeing is different, can you report the Tornado + motor version as well as the error you’re seeing?

1 Like

@avysotsky I wanted to let you know that a fix went out with our latest release (v2.86.0.65) regarding the errors you were seeing for motor instrumentation. Check out our release notes here:


1 Like

Not sure why this one is solved. Asyncio support has not been released yet.

Yes you are right, @avysotsky. Thanks for checking in and for adding your use case above. I have unmarked the solution check box. :thumbsup:

I’m pleased to announce that our release of the Python agent is out, and it includes out of the box instrumentation support for aiohttp client, including support for cross application tracing. After updating to the latest agent, those of you using this asyncio-based client library for external requests should now see these requests on the external services page and in transaction breakdowns and transaction traces.

Give it a try and let us know what you think!


hey @jstuckey thats awesome news. I just tested on a non-web service and works nicely, now I see the transactions like any other normal python process. Will add more instrumentation, custom parameters and error tracing during the rest of the week, then I’ll let you know.

I really appreciate!