Search in sources :

Example 1 with GangliaException

use of info.ganglia.gmetric4j.gmetric.GangliaException in project metrics by dropwizard.

the class GangliaReporter method reportGauge.

private void reportGauge(String name, Gauge gauge) {
    final String sanitizedName = escapeSlashes(name);
    final String group = group(name);
    final Object obj = gauge.getValue();
    final String value = String.valueOf(obj);
    final GMetricType type = detectType(obj);
    try {
        announce(name(prefix, sanitizedName), group, value, type, "");
    } catch (GangliaException e) {
        LOGGER.warn("Unable to report gauge {}", name, e);
    }
}
Also used : GMetricType(info.ganglia.gmetric4j.gmetric.GMetricType) GangliaException(info.ganglia.gmetric4j.gmetric.GangliaException)

Aggregations

GMetricType (info.ganglia.gmetric4j.gmetric.GMetricType)1 GangliaException (info.ganglia.gmetric4j.gmetric.GangliaException)1