SQL Query Tracking

(Suikast42) #1

I am using the apm agent with a wildfly application server.

The apm agent is only tracking the perpared statements of hibernate. But this one is not so useful for analysing the queries on the database for db performance issues.

Is there an option to chosse the query logging in the apm agent ? I see in the jdbc pluging that the agent tracking both. java.sql.Satement and PerparedSatement.

On the other hand I had the idea to use p6spy for tracking the real SQL statements. But I see the github issue from felix.
@felixbarny do you recommend to use p6spy in apm plugin ?

(Felix Barnsteiner) #2

What are you missing in the statements captured by the Java agent? Is it that you want to see the query parameters? Our agents don't capture those because of security/privacy (to not log hashed passwords or otherwise sensitive information) and performance concerns.

If you want to also log the parameters, p4spy is a very good option to log the full statements into a separate log file.

(Suikast42) #3

I want exactly see that. But not for production only for development purpose.

How is the perfomance impact to use p6spy for that purpose ?

That can be an idea to create a transaction id in the log document and show it in a seperate dashboard :wink:

(Lyle Simmons) #4

Do not mind referring to customer database management from time to time. This company had been of a great help at proper time when working with database.