javamelody / grails-melody-plugin

JavaMelody monitoring plugin for Grails, to monitor application performance
https://plugins.grails.org/plugin/grails-melody-plugin
Apache License 2.0
32 stars 31 forks source link

Add Grails 3 support and publish to Bintray #25

Closed dpilafian closed 8 years ago

dpilafian commented 9 years ago

It would be helpful to have the JavaMelody Grails Plugin listed at:

I was able to get the plugin to download by adding the dependency to the build file:

build.gradle

compile "net.bull.javamelody:javamelody-core:1.56.0"

However, a 404 results when attempting to open the console:

Environment:

$ grails --version
| Grails Version: 3.0.3
| Groovy Version: 2.4.3
| JVM Version: 1.8.0_51
$ uname -a
Darwin Blade.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
evernat commented 9 years ago

It seems that there is an upgrade plugin doc

For 404 on http://localhost:8080//monitoring, I suppose that something with filters does not work in GrailsMelodyGrailsPlugin.groovy with Grails 3.

A pull request would be great.

sergiomichels commented 9 years ago

doWithWebDescriptor is not available anymore, so we need to convert it to the Spring Boot way.

I will try to work in this migration on my free time. If I finish it, could I just make a pull request to master or should a branch be created to Grails 3?

evernat commented 9 years ago

I think that a pull request is ok, since I don't plan to maintain two version in parallel.

About the Spring Boot way, you can see an example of javamelody in Spring Boot here: https://github.com/javamelody/javamelody/blob/master/javamelody-for-spring-boot/src/main/java/hello/JavaMelodyConfiguration.java

sergiomichels commented 9 years ago

Thanks for the link, the filter worked! I'm almost done with a first version, just need more tests to confirm that I didn't break any feature.

sergiomichels commented 9 years ago

Found the first difference. In Grails 2.x MonitoringProxy.getSpringCounter().isDisplayed() returns true but not in Grails 3.x.

evernat commented 9 years ago

The call to SPRING_COUNTER.isDisplayed() in GrailsMelodyGrailsPlugin.groovy should be changed as part of PR #28, if it is the problem here.

sergiomichels commented 8 years ago

Yep, #28 fixed it.

sergiomichels commented 8 years ago

@dpilafian can you try my snapshot? https://github.com/sergiomichels/grails-melody-plugin

akozel commented 8 years ago

Will that appear in bintray.com? What should we do to install the plugin at grails 3? Help.

sergiomichels commented 8 years ago

Download as zip and do an local install in your maven, then it will be available to you.

akozel commented 8 years ago

thank you, @sergiomichels. I managed to install that. Could you please add that to the official repository.

Also tere s small guide how to install melody.

  1. download zip
  2. add to plugins folder the '.gradle' and 'gradle' folders (you can get it from yours proj)
  3. go to plugns folder via console and run gradlew.bat install
  4. Now plugin installed into your maven. For example I can find it here (by default): (C:\Users\_your_username_\.m2\repository\org\grails\plugins)
  5. Add dependency to your project 'runtime 'org.grails.plugins:grails-melody-plugin-master:2.0-SNAPSHOT'

P.s. Dont forget to configure spring sequripy plugin (if installed) grails.plugin.springsecurity.controllerAnnotations.staticRules = [ [pattern: '/monitoring', access: ['ROLE_ADMIN']] ]

sergiomichels commented 8 years ago

Plugin uploaded to Bintray

Waiting now to see it appears in the official repository (request sent).