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:
- The value behind ? was "%" + query + "%", leading "%" prevents index usage and query was slow.
- In our application one request triggers around 1000 queries, all of them are identical and query #666 spends x10 times more time than others.