de.is24.util.monitoring.statsd
Class StatsdPlugin
java.lang.Object
de.is24.util.monitoring.AbstractMonitorPlugin
de.is24.util.monitoring.statsd.StatsdPlugin
- All Implemented Interfaces:
- MonitorPlugin
public class StatsdPlugin
- extends AbstractMonitorPlugin
InApplicationMonitor plugin. Forwards monitoring to a Statsd server.
Enable via InApplicationMonitor.getInstance().registerPlugin(new StatsdPlugin("myStatsdHost", 1234));
delegate
private final StatsdClient delegate
uniqueName
private final String uniqueName
sampleRate
private double sampleRate
highVolumeSampleRate
private double highVolumeSampleRate
StatsdPlugin
public StatsdPlugin(String host,
int port,
String appName)
throws UnknownHostException,
SocketException
- Create a Statsd plugin with a specified host and port.
- Parameters:
host - the host of the Statsd server.port - the port of the Statsd server.appName - a short application identifier to fulfill IS24 / Graphite naming scheme requirements through statsd
- Throws:
UnknownHostException - if there is no such host as specified.
SocketException - if the socket to the host could not be opened.
StatsdPlugin
public StatsdPlugin(String host,
int port,
String appName,
double sampleRate)
throws UnknownHostException,
SocketException
- Throws:
UnknownHostException
SocketException
StatsdPlugin
StatsdPlugin(StatsdClient client,
String uniqeName)
initHighVolumeSampleRate
private void initHighVolumeSampleRate()
getUniqueName
public String getUniqueName()
sanitizeKey
private String sanitizeKey(String key)
incrementCounter
public void incrementCounter(String key,
int increment)
incrementHighRateCounter
public void incrementHighRateCounter(String key,
int increment)
initializeCounter
public void initializeCounter(String name)
addTimerMeasurement
public void addTimerMeasurement(String key,
long timing)
addSingleEventTimerMeasurement
public void addSingleEventTimerMeasurement(String name,
long timing)
initializeTimerMeasurement
public void initializeTimerMeasurement(String name)
addHighRateTimerMeasurement
public void addHighRateTimerMeasurement(String key,
long timing)
Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.