Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for mysql2/promise #650

Open
mpoitras opened this issue Aug 31, 2021 · 3 comments · May be fixed by #2525
Open

Add support for mysql2/promise #650

mpoitras opened this issue Aug 31, 2021 · 3 comments · May be fixed by #2525

Comments

@mpoitras
Copy link

When using library mysql2, instrumentation does not pickup calls made through mysql2/promise (https://www.npmjs.com/package/mysql2#using-promise-wrapper).

AFAIK, it does not look for promises require (https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts#L51), only 'mysql2'.

This is only for Node since databases are not normally used in browsers.

Weekly Downloads: ???
I would expect a large percentage of people using mysql2 would want promises. Over time. the usage of promises will continue to increase.

Versions: latest

@dyladan
Copy link
Member

dyladan commented Aug 31, 2021

This might be as simple as intercepting the require and adding tests. As far as I know the promise wrapper uses the same internals we already patch.

@alexdrans
Copy link

@mpoitras Did you make any progress on instrumenting mysql2?

@mbrevda
Copy link

mbrevda commented Jun 7, 2022

This seems to be working now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants