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

Fix cannot to disable spring counter #28

Closed timic closed 8 years ago

timic commented 8 years ago

Service interceptor from plugin is a bit buggy. So I want to disable it. But I can't.

This is because counter's displayed property is will be set later when MonitoringFilter will be initialized.

It seems to be better to use isUsed method which check counter availability in context init-params.

evernat commented 8 years ago

I think that we can't call "isUsed" there, because it will never return true if an instance of MonitoringSpringInterceptor is not created.

Would ! Parameters.isCounterHidden("spring") be better than SPRING_COUNTER.isDisplayed() ?

timic commented 8 years ago

Yes, it is. I'll update pull request.

evernat commented 8 years ago

Thanks timic