lemonzone2010 / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Hotspots are not being gathered using centralized monitoring #350

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.start application with configured javamelody monitoring
2.connect to it using centralized server

What is the expected output? What do you see instead?
Expected output - correctly shown hotspots
Empty table shown instead

Debugging shows that when monitoring server connects 
MOnitoringFilter.doMonitoring is called which executes this part:
if ("stop".equalsIgnoreCase(httpRequest.getParameter(COLLECTOR_PARAMETER))) {
            // on a été appelé par un serveur de collecte qui fera l'aggrégation dans le temps,
            // le stockage et les courbes, donc on arrête le timer s'il est démarré
            // et on vide les stats pour que le serveur de collecte ne récupère que les deltas
            for (final Counter counter : collector.getCounters()) {
                counter.clear();
            }

            if (!collector.isStopped()) {
                LOG.debug("Stopping the javamelody thread in this webapp, because a collector server from "
                        + httpRequest.getRemoteAddr() + " wants to collect the data itself");
                if (filterContext.getTimer() != null) {
                    filterContext.getTimer().cancel();
                }
                collector.stop();
            }
        }
So timer gets cancelled ant thread stack traces are not veing connected aymore.

Original issue reported on code.google.com by kaln...@gmail.com on 16 Oct 2013 at 5:17

GoogleCodeExporter commented 9 years ago
As you have seen, the timer thread is canceled when there is a centralized 
server, even when hotspots sampling is configured in the webapps.

It is fixed in trunk (revision 3561) and ready for the next release (1.48).

I have made a new build, to be included in the monitored webapps from the 
centralized collect server, and it is available at:
https://javamelody.googlecode.com/files/javamelody-20131110.jar

Original comment by evernat@free.fr on 10 Nov 2013 at 3:56