When I go to APM > Applications > PHP Application > Databases it shows the list of queries and their performance. But the queries are shown like <table name> select
. How can I see the full query?
Asked
Active
Viewed 505 times
-1

littleibex
- 1,705
- 2
- 14
- 35
2 Answers
1
If you have a paid account with New Relic, you will have access to slow SQL queries and Transaction Traces; these will show up in the UI if the apdex_f is reached for transactions.
More info here: https://docs.newrelic.com/docs/apm/applications-menu/monitoring/view-slow-query-details

Kinsey
- 104
- 5
-
This doesn't answer the question. He says the statistics are showing up, but the full text of the query is not, just "Tablename select". – c0bra Dec 09 '19 at 16:17
1
According to https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration#tx_tracer_config you have to set the record_sql
configuration to either 'raw'
or 'obfuscated'
. By default it is 'off'
so you won't see the SQL.
Keep in mind that this is in the transaction_tracer
sections. So for Node.js for instance (I know you're using PHP), you would do:
{
transaction_tracer: {
record_sql: 'raw',
},
}

c0bra
- 2,982
- 23
- 34