@Override public void close() { statsd.stop(); }
public void close() { if (statsdClient!=null) { statsdClient.stop(); } }
public void close() { if (statsdClient!=null) { statsdClient.stop(); } }
@Override public void destroy() { statsd.stop(); }
@Override public void cleanup() { statsd.stop(); } }
@Override public void stop() { statsd.stop(); }
public void close() throws IOException { statsd.stop(); }
public void close() throws IOException { statsd.stop(); }
@Override public void stop() { logger.trace("Stopping DataDog reporter."); client.stop(); }
public void close() { if (client != null) { synchronized (this) { if (client != null) { log.info("Closing the STATSD client"); client.stop(); client = null; } } } }
@Override public void stop() { if (producer != null) { producer.close(); } if (statsDClient != null) { statsDClient.stop(); } }
protected void sendMetricPoint( String metricType, String metricName, double value, String[] tags) { if (System.currentTimeMillis() - this.initializationTime > 300 * 1000) { this.statsDClient.stop(); init(); } if (metricType.equals("histogram")) { statsDClient.histogram(metricName, value, tags); } else { statsDClient.gauge(metricName, value, tags); } }
/** * Submits service check. * */ public void doSendServiceCheck(String checkName, String status, String message, String[] tags) { if (System.currentTimeMillis() - this.initializationTime > 300 * 1000) { this.statsDClient.stop(); init(); } ServiceCheck sc = new ServiceCheck( String.format("%s.can_connect", checkName), this.statusToInt(status), message, tags); statsDClient.serviceCheck(sc); }
client.stop(); String hp = daemonHost.split(":")[0]; int pp = Integer.parseInt(daemonHost.split(":")[1]);
logger.severe(ex.getMessage()); statsd.stop();
@Override public void updateImpl(List<Metric> metrics) { // The statsd client doesn't do any checks on the underlying socket's state // and the socket connects only once, so we cannot trust the socket to stay // open over a period of time. If this is changed/fixed we could reuse the // client but until then it cannot be safely reused. StatsDClient statsd = createClient(); LOGGER.debug("sending data"); try { for (Metric metric : metrics) { String aspect = namingConvention.getName(metric); if (metric.getConfig().getTags().getTag(DataSourceType.COUNTER.getValue()) != null) { statsd.count(aspect, metric.getNumberValue().longValue()); } else if (metric.hasNumberValue()) { statsd.gauge(aspect, metric.getNumberValue().longValue()); } else { statsd.set(aspect, metric.getValue().toString()); } statsd.time(aspect, metric.getTimestamp() / 1000); } } finally { statsd.stop(); } }