# APM node agent does not capture mysql queries

**URL:** <https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925>\
**Category:** APM\
**Created:** [April 13, 2018, 7:57am UTC](https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925 "2018-04-13T07:57:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaharyar](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@shaharyar](https://discuss.elastic.co/u/shaharyar)\
**Post date:** [April 13, 2018, 7:57am UTC](https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925/1 "2018-04-13T07:57:19Z")

</div>

We setup APM agent in our nodejs application. It captures requests even made by other npm too _(which is very good)_, but it does not capture any queries to mysql.

We are using [squelize](http://docs.sequelizejs.com/) as ORM to mysql.

---

<div class="post-metadata">

**Author:** ![wa7son](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wa7son/32/21259_2.png) [@wa7son](https://discuss.elastic.co/u/wa7son)\
**Post date:** [April 13, 2018, 8:59am UTC](https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925/2 "2018-04-13T08:59:19Z")

</div>

Thanks for trying out Elastic APM 🙂

We don't directly instrument sequelize. Instead we instrument the specific database driver installed as a peer dependency to sequelize.

Are you using the [mysql](https://www.npmjs.com/package/mysql) package or the [mysql2](https://www.npmjs.com/package/mysql2) package?

You can also see a list of all the database modules we currently support here: [https://www.elastic.co/guide/en/apm/agent/nodejs/current/compatibility.html#compatibility-tracing-and-instrumentation](https://www.elastic.co/guide/en/apm/agent/nodejs/current/compatibility.html#compatibility-tracing-and-instrumentation)

---

<div class="post-metadata">

**Author:** ![shaharyar](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@shaharyar](https://discuss.elastic.co/u/shaharyar)\
**Post date:** [April 13, 2018, 10:40am UTC](https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925/3 "2018-04-13T10:40:37Z")

</div>

Sequelize uses `mysql2` npm.

---

<div class="post-metadata">

**Author:** ![wa7son](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wa7son/32/21259_2.png) [@wa7son](https://discuss.elastic.co/u/wa7son)\
**Post date:** [April 13, 2018, 1:04pm UTC](https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925/4 "2018-04-13T13:04:40Z")

</div>

We currently do not support automatic instrumentation of the mysql2 module. But we're actively working on it. You can follow the progress in [PR#298](https://github.com/elastic/apm-agent-nodejs/pull/298). Once that's released, you should see mysql spans.

---

<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:** [May 4, 2018, 9:04am UTC](https://discuss.elastic.co/t/apm-node-agent-does-not-capture-mysql-queries/127925/5 "2018-05-04T09:04:52Z")

</div>

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