How do you use probes in one apm java to get the execution time of sql?

I tried one apm, to see that it can monitor the execution time and sql statements of the project sql. How does it do that? If you configure it in the project, you can get the sql execution time and so on. But the one apm probe is on the outside. How on earth do it?

Mar.16,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdbd7b-4583f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdbd7b-4583f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?