Slow Query tracing: Increase buffer for capturing the query

Is there a way to increase the buffer for capturing a query in Slow Query Tracing?

We have captured a query that ends with the text …(1,486 more chars)
We need to see the rest of the query.

Please advise

I created a support ticket for this question and received this reply:

Brian Yang**** (New Relic)

Jan 15, 2021, 10:29 CST

Hi Scott,

Thanks for reaching to New Relic Support.
The default size is 2000 character limit for the query string. It appears for the Java agent there is an undocumented configuration you can set under the transaction_tracer section called insert_sql_max_length where you can specify this character limit. If there are many slow SQL queries where we are gathering large chunks of information, you could see a hit in performance or impact to how quickly the data makes it to the dashboard. Increase the value gradually until you find the right balance of information and performance.

In the newrelic.yml configuration file, you can add:


insert_sql_max_length: 10000

You may already have the transaction_tracer section, so just add the insert_sql_max_length under that grouping.

Be sure to watch the indenting as it should be 2 spaces in from the parent .

A restart of the JVM is necessary for the change to be picked up and implemented.


Brian Yang
Technical Support Engineer
New Relic Inc Atlanta


Hello @Scott_Harder,

Excellent! That sounds like a great answer, and I appreciate you sharing for the benefit of others. :smile: