0

I am using com.sparkjava library for writing API.I want to monitor the metrics of these API like the average ,min and max time taken to give the response, throughput for the API's and count of request sent for the API etc.,

I was looking for a suitable library which provides all these data.I want these metrics data to be registered in the JVM using the JMX technology.I know of codahale.metrics library for registering ,apart from that are there any other better libraries?I don't want to write the MBean objects and register in the MBeanRegisrty unless there is no other alternative.I am looking for a library which gives the above metrics data once i run the application.

uttam
  • 435
  • 9
  • 24
  • All you need is to take the time at the start and record the difference at the end. You can use an aspect orientated library to do this for you if this is not an option. – Peter Lawrey Jun 25 '15 at 19:46
  • that fine....I tried something like this for getting the metrics http://stackoverflow.com/questions/31134493/updating-the-jmx-values-for-the-apis-exposed-using-sparkjava ..here I tried to set the timer and tried to get the response time for the API's but I cannot get the updated response everytime i tried to refresh the link..Can you help me with this. – uttam Jun 30 '15 at 10:36
  • sometimes it is easier to write a small piece of code than understand how some else's code works. I would write a simple JMX component to do this if I were you. – Peter Lawrey Jul 01 '15 at 05:31

1 Answers1

1

Have you tried newrelic? It's very easy to set up and gives you a lot of data out of the box :)

hrmffffff
  • 100
  • 1
  • 6