The JDBC API lists a includeThreadNamesAsStatementComment parameter that seems to indicate it will prefix all queries with the Java thread ID. I thought this would be useful in tying back DB activity to application logs. I added it to my resource URLs and it seemed to only be working part of the time.
Curiously it was only the applications heartbeat thread that periodically pings the database as part of a health check. None of the “real” queries were getting tagged.
Why isn’t this working for all queries?