newrelic-python-agent icon indicating copy to clipboard operation
newrelic-python-agent copied to clipboard

mysql instrumentation in async contexts

Open nburns opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I'd like to be able to instrument database calls with an async mysql python module.

Feature Description

A clear and concise description of the feature you want or need. Support for aiomysql or a recommendation of a supported async mysql database connector for sqlalchemy.

Describe Alternatives

A clear and concise description of any alternative solutions or features you've considered. Are there examples you could link us to? Couldn't really find any alternatives, I was surprised that there were no hooks defined for the aiomysql package because it seems pretty popular for async python.

Additional context

Add any other context here. We're implementing graphql with async parallel resolution and will lose the ability to monitor sql timing/queries without agent support for aiomysql or another async mysql connector for sqlalchemy.

Priority

Please help us better understand this feature request by choosing a priority from the following options: Must Have

nburns avatar Oct 26 '23 17:10 nburns

I can bring this feature up to our product team, is aiomysql the correct library to bring up? Or are there any others you've used?

TimPansino avatar Oct 26 '23 17:10 TimPansino

aiomysql support would be preferred unless someone can point to another supported mysql async package, just wanted to leave open the possibility of me missing something and there being an existing solution that I wasn't aware of (kinda suprised that nobody had hit and raised this issue previously).

aiomysql seems to be the most popular, and the aio-libs org seems to produce decently high quality stuff, so that's currently our preference, asyncmy seems to also be a contender but less popular.

https://github.com/aio-libs/aiomysql https://github.com/long2ice/asyncmy

nburns avatar Oct 26 '23 18:10 nburns

Does this mean there's async mysql support? 🥺

nburns avatar Feb 13 '25 19:02 nburns