public interface StatsDClient
Four key methods are provided for the submission of data-points for the application under scrutiny:
incrementCounter(java.lang.String) - adds one to the value of the specified named counterrecordGaugeValue(java.lang.String, long) - records the latest fixed value for the specified named gaugerecordExecutionTime(java.lang.String, long) - records an execution time in milliseconds for the specified named operationrecordSetEvent(java.lang.String, java.lang.String) - records an occurrence of the specified named event| Modifier and Type | Method and Description |
|---|---|
void |
count(java.lang.String aspect,
long delta)
Adjusts the specified counter by a given delta.
|
void |
count(java.lang.String aspect,
long delta,
double sampleRate)
Adjusts the specified counter by a given delta.
|
void |
decrement(java.lang.String aspect)
Convenience method equivalent to
decrementCounter(String). |
void |
decrementCounter(java.lang.String aspect)
Decrements the specified counter by one.
|
void |
gauge(java.lang.String aspect,
long value)
Convenience method equivalent to
recordGaugeValue(String, long). |
void |
increment(java.lang.String aspect)
Convenience method equivalent to
incrementCounter(String). |
void |
incrementCounter(java.lang.String aspect)
Increments the specified counter by one.
|
void |
recordExecutionTime(java.lang.String aspect,
long timeInMs)
Records an execution time in milliseconds for the specified named operation.
|
void |
recordExecutionTime(java.lang.String aspect,
long timeInMs,
double sampleRate)
Adjusts the specified counter by a given delta.
|
void |
recordExecutionTimeToNow(java.lang.String aspect,
long systemTimeMillisAtStart)
Records an execution time in milliseconds for the specified named operation.
|
void |
recordGaugeDelta(java.lang.String aspect,
long delta)
Records a change in the value of the specified named gauge.
|
void |
recordGaugeValue(java.lang.String aspect,
long value)
Records the latest fixed value for the specified named gauge.
|
void |
recordSetEvent(java.lang.String aspect,
java.lang.String eventName)
StatsD supports counting unique occurrences of events between flushes, Call this method to records an occurrence
of the specified named event.
|
void |
set(java.lang.String aspect,
java.lang.String eventName)
Convenience method equivalent to
recordSetEvent(String, String). |
void |
stop()
Cleanly shut down this StatsD client.
|
void |
time(java.lang.String aspect,
long value)
Convenience method equivalent to
recordExecutionTime(String, long). |
void stop()
void count(java.lang.String aspect,
long delta)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the counter to adjustdelta - the amount to adjust the counter byvoid count(java.lang.String aspect,
long delta,
double sampleRate)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the counter to adjustdelta - the amount to adjust the counter bysampleRate - the sampling rate being employed. For example, a rate of 0.1 would tell StatsD that this counter is being sent
sampled every 1/10th of the time.void incrementCounter(java.lang.String aspect)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the counter to incrementvoid increment(java.lang.String aspect)
incrementCounter(String).void decrementCounter(java.lang.String aspect)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the counter to decrementvoid decrement(java.lang.String aspect)
decrementCounter(String).void recordGaugeValue(java.lang.String aspect,
long value)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the gaugevalue - the new reading of the gaugevoid recordGaugeDelta(java.lang.String aspect,
long delta)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the gaugedelta - the +/- delta to apply to the gaugevoid gauge(java.lang.String aspect,
long value)
recordGaugeValue(String, long).void recordSetEvent(java.lang.String aspect,
java.lang.String eventName)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the seteventName - the value to be added to the setvoid set(java.lang.String aspect,
java.lang.String eventName)
recordSetEvent(String, String).void recordExecutionTime(java.lang.String aspect,
long timeInMs)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the timed operationtimeInMs - the time in millisecondsvoid recordExecutionTime(java.lang.String aspect,
long timeInMs,
double sampleRate)
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the counter to adjustdelta - the amount to adjust the counter bysampleRate - the sampling rate being employed. For example, a rate of 0.1 would tell StatsD that this timer is being sent
sampled every 1/10th of the time, so that it updates its timer_counters appropriately.void recordExecutionTimeToNow(java.lang.String aspect,
long systemTimeMillisAtStart)
System.currentTimeMillis())
This method is non-blocking and is guaranteed not to throw an exception.
aspect - the name of the timed operationtimeInMs - the system time, in millis, at the start of the operation that has just completedvoid time(java.lang.String aspect,
long value)
recordExecutionTime(String, long).