Package com.dianping.cat.message

Examples of com.dianping.cat.message.Metric.addData()


  public void logMetric(String name, String status, String nameValuePairs) {
    String type = "";
    Metric metric = newMetric(type, name);

    if (nameValuePairs != null && nameValuePairs.length() > 0) {
      metric.addData(nameValuePairs);
    }

    metric.setStatus(status);
    metric.complete();
  }
View Full Code Here


      if (StringUtils.isNotEmpty(sourceIp) && StringUtils.isNotEmpty(vip)) {
        Metric metric = Cat.getProducer().newMetric("cdn", vip + ":" + sourceIp);

        metric.setStatus("C");
        metric.addData(String.valueOf(1));
      }
    } catch (Exception e) {
      Cat.logError(e);
    }
    chain.doFilter(request, 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.