How to track bean service using @timed annotations?

The Jhipster ev team recommends using the @Timed annotation for the services you want to control.

It is presented when creating the service page ( http://jhipster.imtqy.com/creating_a_service.html ).

So how does it work in JHipster? How can I control these services annotated? And what is the cost of supporting this annotation in all services? Any processing overhead using this annotation during the manufacturing process?

+4
source share
1 answer

JHipster uses DropWizard metrics (have you seen the technical stack here ?), And those @Timed annotations come from Spring Dropwizard metrics support .

For more information on DropWizard metrics, here is their website .

Of course, there is overhead, but it depends on how you use these annotations: if only one access to the database will work on the bean service, then you should not worry about it, since access to the database is more orders resource intensive. We use it for very high traffic applications without any problems, and in any case, in case of performance problems, we better control than be blind!

Of course, you can track these services to make all the sense:

  • , JMX, Java.
  • JHipster AngularJS JHipster. mvn .
+5

Source: https://habr.com/ru/post/1615621/


All Articles