[Node] Queries listed as Postgres Other

I have a NodeJS application hosted on Heroku and I’m using Heroku Postgres. Under the databases tab, most of my queries are listed as “Postgres Other.” It does however list 3 of my select queries, so the node agent is still able to figure out SOME of them. How do I get New Relic to correctly split out all of the database queries?

I did search the newrelic support and found two topics on the matter. The more recent post from 2017/2018 indicated that it might have been a Postgres JDBC driver issue. Is that still the case?

Further relevant information:

  • Heroku w/ New Relic Heroku Addon
  • NodeJS and ExpressJS
  • Heroku Postgres (so I assume JDBC drivers are what Heroku sets)
  • KnexJS (query builder) and ObjectionJS (ORM)
  • I am using serializable transactions
  • Agent was set to ^5.0.0, so I assume this meant 5.13.1. I am updating it to latest
  • I’m unsure how to provide a link to my application as the template suggested

Hello @dev.squatsandscience :grin:

The issue you are seeing is likely due to KnexJS. KnexJS is not supported by the Node Agent currently, and so some of the Node instrumentation gets lost in the pooling that KnexJS uses.

There is a great discussion on this, as well as suggestions for custom instrumentation here:

I would also suggest voting on the Feature Idea, our Product team uses the community interest when planning future roadmaps:

You can also increase the Node agent instrumentation of Database queries to get more information on these traces:

1 Like