Example #1
0
 public override void check(ApiStatInfo apiStatInfo)
 {
     if (apiStatInfo.getErrorCount() > rule.getMatchedRule(apiStatInfo.getApi()).getMaxErrorCount())
     {
         notification.notify(NotificationEmergencyLevel.SEVERE, "...");
     }
 }
Example #2
0
 public void check(ApiStatInfo apiStatInfo)
 {
     foreach (AlertHandler handler in alertHandlers)
     {
         //执行检查逻辑
         handler.check(apiStatInfo);
     }
 }
Example #3
0
        public override void check(ApiStatInfo apiStatInfo)
        {
            long tps = apiStatInfo.getRequestCount() / apiStatInfo.getDurationOfSeconds();

            if (tps > rule.getMatchedRule(apiStatInfo.getApi()).getMaxTps())
            {
                notification.notify(NotificationEmergencyLevel.URGENCY, "...");
            }
        }
Example #4
0
 public abstract void check(ApiStatInfo apiStatInfo);
Example #5
0
 public override void check(ApiStatInfo apiStatInfo)
 {
     //新增逻辑
 }