美文网首页程序员
调用超时监控组件开源

调用超时监控组件开源

作者: edagarli | 来源:发表于2016-04-04 15:24 被阅读130次

调用超时监控组件( https://github.com/2-dfire/twodfire-monitor )
这是我公司内部使用的超时监控组件,现在开源出来。对于中小型企业来说,已经完全满足了。

介绍

当某个action或接口执行超过设定阈值时将把调用栈的各个步骤开销打印出来。

使用

<bean id="monitorAround" class="com.twodfire.timerMonitor.monitor.MonitorAround">  
  <property name="maxTime" value="300"/><!-- 最大的超时时间-->
</bean>
<aop:config>
   <aop:aspect id="testAspect" ref="monitorAround">    
       <aop:pointcut id="timeMonitorPointcut"   expression="execution(* *..service*..*(..))"/>    
      <aop:around pointcut-ref="timeMonitorPointcut" method="watchPerformance"/>
   </aop:aspect>
</aop:config>

示例

https://github.com/edagarli/monitor-example/

contact me

Weibo: @edagarli

开源协议

MIT

相关文章

网友评论

    本文标题:调用超时监控组件开源

    本文链接:https://www.haomeiwen.com/subject/nyoulttx.html