caitale / javamelody

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

Add custom counters #251

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be really useful to be able to have custom counters within an app that 
I can inform Java Melody about and Java Melody keeps the stats on and graphs 
and reports.

Original issue reported on code.google.com by jon.ner...@gmail.com on 10 Sep 2012 at 4:43

GoogleCodeExporter commented 9 years ago
Sorry I mean this to be a feature request, not a defect.

Original comment by jon.ner...@gmail.com on 10 Sep 2012 at 5:13

GoogleCodeExporter commented 9 years ago

Original comment by evernat@free.fr on 10 Sep 2012 at 9:37

GoogleCodeExporter commented 9 years ago
This would be really useful in our production environment, we already use 
JavaMelody and this would allow us to periodically log some information (like 
number of objects in a specific queue etc.) that we could then analyze using 
the normal JavaMelody graphs etc.

Original comment by david.m....@gmail.com on 23 Jan 2014 at 12:30

GoogleCodeExporter commented 9 years ago
Same too

Original comment by m.szajow...@gmail.com on 8 Feb 2014 at 9:50

GoogleCodeExporter commented 9 years ago
Also interested in this feature

Original comment by wim.roel...@gmail.com on 5 Mar 2014 at 1:48

GoogleCodeExporter commented 9 years ago
Same too

Original comment by jiglesia...@gmail.com on 7 May 2014 at 9:41

GoogleCodeExporter commented 9 years ago
same too

Original comment by zer...@gmail.com on 21 Nov 2014 at 2:13

GoogleCodeExporter commented 9 years ago
Same too

Original comment by odon.raf...@gmail.com on 28 Nov 2014 at 7:39

GoogleCodeExporter commented 9 years ago
Java Simon has this feature 
http://javasimon.googlecode.com/svn/javadoc/api-3.0/org/javasimon/Counter.html, 
i think we need only some API to set value

Original comment by jaroslaw...@gmail.com on 8 Jan 2015 at 4:08

GoogleCodeExporter commented 9 years ago
If your goal is to display stats in a table about durations of some operations, 
then look at Monitoring services/façades with EJB, Spring or Guice or withtout 
in the user guide:
https://code.google.com/p/javamelody/wiki/UserGuideAdvanced#Business_facades_%28
without_EJB3_and_without_Spring_and_without_Gu
https://code.google.com/p/javamelody/wiki/UserGuide#8._Business_facades_%28ejb-j
ar.xml_file_if_EJB3%29

Otherwise, if your goal is to display new graphs of some other values, then I 
think that the right enhancement for this is a said in issue 384. That is a 
parameter which lists names of JMX/MBean, and either these MBeans already 
exists from some tool (hibernate, connection pool, etc) or you create these 
MBeans. (javamelody may also provide an api to help creating MBeans). With this 
parameter javamelody will be able to read values periodically from MBeans and 
display the values in new graphs.

Original comment by evernat@free.fr on 8 Jan 2015 at 5:21

GoogleCodeExporter commented 9 years ago
Yes, solving issue 384 would solve this issue as well, I think.
I will add a few comments to 384 about that would be nice about that feature.

Original comment by alf.hoge...@gmail.com on 9 Jan 2015 at 6:32

GoogleCodeExporter commented 9 years ago
I did implement the collect custom JMX bean statistics feature in a basic 
version that fits my needs.

See:
https://github.com/evernat/javamelody/pull/2
https://groups.google.com/forum/#!topic/javamelody/hA8Z5EfFMTY

Original comment by sascha...@googlemail.com on 11 Apr 2015 at 10:03