You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently been working with DatasourceProxy to capture slow queries, and I noticed that there is an abstract query listener - I just need to override writeLog or onSlowQuery.
But when I registered MySlowQueryListner as an bean. I get an NPE at runtime. This is because the thresholdtimeunit required by Thread.schedule() is not configured by the ProxyDatasourceBuilderConfigurer.
So I solved this issue by injecting the datasource proxy property and setting the fields the same as any other SlowQueryListener. This issue asks for feedback on setting the required fields for user registered SlowQueryListener in the ProxyDatasourceBuilderConfigurer.
If this is in line with the direction of the project, can we make a PR for this?
The text was updated successfully, but these errors were encountered:
TaeTaeKim
changed the title
[DatasourceProxy] How about allowing to extending AbstractSlowQueryListener to make easily capture and customise operations on slow queries?
[DatasourceProxy] How about allowing extending AbstractSlowQueryListener to make it easier to capture and customise actions for slow queries?
Feb 2, 2025
hello,
I've recently been working with DatasourceProxy to capture slow queries, and I noticed that there is an
abstract query listener
- I just need to overridewriteLog
oronSlowQuery
.But when I registered
MySlowQueryListner
as an bean. I get an NPE at runtime. This is because thethreshold
timeunit
required byThread.schedule()
is not configured by theProxyDatasourceBuilderConfigurer
.So I solved this issue by injecting the datasource proxy property and setting the fields the same as any other
SlowQueryListener
. This issue asks for feedback on setting the required fields for user registered SlowQueryListener in theProxyDatasourceBuilderConfigurer
.If this is in line with the direction of the project, can we make a PR for this?
The text was updated successfully, but these errors were encountered: