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.

3
  • 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. Commented Jun 25, 2015 at 19:46
  • that fine....I tried something like this for getting the metrics stackoverflow.com/questions/31134493/… ..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. Commented Jun 30, 2015 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. Commented Jul 1, 2015 at 5:31

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

do u have any other alternative like any library ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.