Package com.dianping.cat.message

Examples of com.dianping.cat.message.Transaction.complete()


        t.complete();
      }
      for (int i = 0; i < 900; i++) {
        Transaction t = Cat.newTransaction("URL", "/detail");
        t.addData("channel=channel" + i % 5);
        t.complete();
      }
      for (int i = 0; i < 500; i++) {
        Transaction t = Cat.newTransaction("URL", "/order/submitOrder");
        Cat.logMetric("order", "quantity", 1, "channel", "channel" + i % 5);
        Cat.logMetric("payment.pending", "amount", i, "channel", "channel" + i % 5);
View Full Code Here


        Transaction t = Cat.newTransaction("URL", "/order/submitOrder");
        Cat.logMetric("order", "quantity", 1, "channel", "channel" + i % 5);
        Cat.logMetric("payment.pending", "amount", i, "channel", "channel" + i % 5);
        Cat.logMetric("payment.success", "amount", i, "channel", "channel" + i % 5);
        t.addData("channel=channel" + i % 5);
        t.complete();
      }

      Thread.sleep(1000);
      break;
    }
View Full Code Here

      semaphore.tryAcquire(count, 10000, TimeUnit.MILLISECONDS);
    } catch (InterruptedException e) {
      // ignore it
      t.setStatus(e);
    } finally {
      t.complete();
    }
    String require = request.getProperty("requireAll");

    if (reports.size() != count && require != null) {
      Cat.logEvent("FetchMetricReportError", request.getDomain(), Event.SUCCESS, null);
View Full Code Here

        t.setStatus("NoReport");
      }
    } catch (Exception e) {
      t.setStatus(e);
    } finally {
      t.complete();
    }
    return null;
  }
}
View Full Code Here

      return builder.toString();
    } catch (Exception e) {
      t.setStatus(e);
      Cat.logError("generate alert summary fail:" + domain + " " + date, e);
    } finally {
      t.complete();
    }
    return null;
  }

  public String execute(String domain, Date date, String receiverStr) {
View Full Code Here

      } catch (Exception e) {
        t.setStatus(e);
      } finally {
        m_currentReports.clear();
        m_lastReports.clear();
        t.complete();
      }
      long duration = System.currentTimeMillis() - current;

      try {
        if (duration < DURATION) {
View Full Code Here

          cat.logError(String.valueOf(message), exception);
        } else {
          cat.logError(exception);
        }
        t.setStatus(Message.SUCCESS);
        t.complete();
      } else {
        cat.logError(exception);
      }
    }
  }
View Full Code Here

        t.setStatus(Transaction.SUCCESS);
      } catch (Exception e) {
        t.setStatus(e);
        m_logger.error(e.getMessage(), e);
      } finally {
        t.complete();
      }

      long duration = System.currentTimeMillis() - current;

      try {
View Full Code Here

    } catch (Exception e) {
      Cat.logError(e);
      t.setStatus(e);
      response.setException(e);
    } finally {
      t.complete();
    }
    return response;
  }

  @Override
View Full Code Here

      }
      t.setStatus(Message.SUCCESS);
    } catch (Exception e) {
      t.setStatus(Message.SUCCESS);
    } finally {
      t.complete();
    }
    return response;
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.