You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the nrpq package to instrument my database calls with the nrpostgres driver, the incorrect table name is being parsed from my query
Description
When I instrument my queries using the nrpostgres driver, if I have a query that uses from outside of the normal context of specifying a table name the data in newrelic shows whatever keyword / token comes right after the from as the table name.
Steps to Reproduce
Instrument a query using the nrpostgres driver and use a query that uses the from keyword in the context of a function like substring or trim.
For example:
For SELECT substring('Thomas' from 2 for 3) as b FROM data, the table name will show up as 2.
For SELECT trim(both ' ' from to_char(id, '99999')) as b FROM data, the table name will show up as to_char.
Expected Behavior
Using the examples from above:
For SELECT substring('Thomas' from 2 for 3) as b FROM data, the table name should show up as data.
For SELECT trim(both ' ' from to_char(id, '99999')) as b FROM data, the table name should show up as data.
When using the
nrpq
package to instrument my database calls with thenrpostgres
driver, the incorrect table name is being parsed from my queryDescription
When I instrument my queries using the
nrpostgres
driver, if I have a query that usesfrom
outside of the normal context of specifying a table name the data in newrelic shows whatever keyword / token comes right after thefrom
as the table name.Steps to Reproduce
Instrument a query using the
nrpostgres
driver and use a query that uses thefrom
keyword in the context of a function likesubstring
ortrim
.For example:
For
SELECT substring('Thomas' from 2 for 3) as b FROM data
, the table name will show up as2
.For
SELECT trim(both ' ' from to_char(id, '99999')) as b FROM data
, the table name will show up asto_char
.Expected Behavior
Using the examples from above:
For
SELECT substring('Thomas' from 2 for 3) as b FROM data
, the table name should show up asdata
.For
SELECT trim(both ' ' from to_char(id, '99999')) as b FROM data
, the table name should show up asdata
.NR Diag results
Your Environment
github.com/newrelic/go-agent/v3/integrations/nrpq v1.1.1
The text was updated successfully, but these errors were encountered: