简体   繁体   English

向JMX添加指标

[英]Adding metrics to JMX

I have 2 questions regarding JMX: What can you measure in your application using JMX? 关于JMX,我有两个问题:使用JMX,您可以在应用程序中衡量什么? Is it possible to add metrics to JMX? 是否可以向JMX添加指标? For instance: seeing how much time a certain operation took. 例如:查看某个操作花费了多少时间。

thanks 谢谢

You can add whatever metrics you like, you decide what you want to monitor. 您可以添加所需的任何指标,然后决定要监视的指标。

For the second question, yes you can measure how much time some operation take. 对于第二个问题,是的,您可以衡量某个操作需要多少时间。

One easy to implement your JMX metrics is to use Spring annotations : 实现JMX度量标准的一种简便方法是使用Spring注释:

http://docs.spring.io/spring/docs/3.2.4.RELEASE/spring-framework-reference/htmlsingle/#jmx-exporting http://docs.spring.io/spring/docs/3.2.4.RELEASE/spring-framework-reference/htmlsingle/#jmx-exporting

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM