Maybe there should be an option to capture DB query values?

Recently I was diagnosing performance issues, I wish I had the option to log database query values.
In general, I think it could be a great option to have, especially useful on dev/test setups.
I know it is not supported, because values might contain sensitive data, but wouldn't it be helpful to have this option, where APM administrators can decide if it should be enabled?
enable_log_correlation did not changed anything for me, since I have no log to correlate spans with, probably should ask developers to log queries, but that is going to take a lot of time and it could not be solution for everyone.
Is there maybe some other option I'm missing to get db-query values?

Personally I bumped into two problems, which could be easily diagnosed using knowing values:

  1. The value behind ? was "%" + query + "%", leading "%" prevents index usage and query was slow.
  2. In our application one request triggers around 1000 queries, all of them are identical and query #666 spends x10 times more time than others.

Hi @giovere and welcome to the forum!

So far we decided not to implement that, but you can upvote the related issue . If there's interest, we may reconsider in the future.

That sounds spooky :fearful:

Jokes aside, I can definitely see the value.

1 Like

Hi @Eyal_Koren
Thanks for the issue link, somehow missed it when searching for it, already added my humble +1.

1 Like

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