Closed MiguelAngel82 closed 6 years ago
This responds myself:
Looking on the JDBC JavaMelody documentation, I've seen that if you add the driver class to net.bull.javamelody.JdbcDriver
it works. So this configuration, in application.yml
works:
dataSource:
[...]
driverClassName: net.bull.javamelody.JdbcDriver
[...]
environments:
development:
dataSource:
dbCreate: create-drop
url: jdbc:mysql://localhost:3306/test?driver=com.mysql.jdbc.Driver
But I'm not sure if this is the best approach or it could work with the javamelody.datasources
property mentioned before.
Configuring the Java Melody JdbcDriver is an workaround and shouldn't be needed. The aim of this plugin is to configure all DataSources automatically.
What happens is that sometimes Grails changes the way that this beans are declared and we need to adapt the plugin.
I opened issue #59, so we can improve the stability of the plugin by testing it on new versions of Grails.
Hi everyone.
I've been trying the plugin with a simple Grails 3 app but I cannot see SQL statistics by default when I access to "monitoring" page.
I've tried some suggested workarounds like this and that, but it doesn't work. For the last suggestiond I've tried this piece of code, in
build.gradle
:But it doesn't work. Maybe I've made some mistake, because showing JavaMelody log I can see this:
Probably, all of this is related to the issue "JDBC DataSource is not wrapped, SQL requests are not monitored". If so, please, let me know what I'm doing wrong because, by default, it does not show SQL statistics.
Thank you very much.
Kind regards, Miguel.