public interface StatsDClient extends Closeable
Three key methods are provided for the submission of data-points for the application under scrutiny:
incrementCounter(java.lang.String, java.lang.String...)
- adds one to the value of the specified named counterrecordGaugeValue(java.lang.String, double, java.lang.String...)
- records the latest fixed value for the specified named gaugerecordExecutionTime(java.lang.String, long, java.lang.String...)
- records an execution time in milliseconds for the specified named operationModifier and Type | Method and Description |
---|---|
void |
close()
Stop the statsd client.
|
void |
count(String aspect,
double delta,
double sampleRate,
String... tags)
Adjusts the specified counter by a given delta.
|
void |
count(String aspect,
double delta,
String... tags)
Adjusts the specified counter by a given delta.
|
void |
count(String aspect,
long delta,
double sampleRate,
String... tags)
Adjusts the specified counter by a given delta.
|
void |
count(String aspect,
long delta,
String... tags)
Adjusts the specified counter by a given delta.
|
void |
countWithTimestamp(String aspect,
double value,
long timestamp,
String... tags)
Set the counter metric at the given time to the specified value.
|
void |
countWithTimestamp(String aspect,
long value,
long timestamp,
String... tags)
Set the counter metric at the given time to the specified value.
|
void |
decrement(String aspect,
double sampleRate,
String... tags)
Convenience method equivalent to
decrementCounter(String, double, String[]) . |
void |
decrement(String aspect,
String... tags)
Convenience method equivalent to
decrementCounter(String, String[]) . |
void |
decrementCounter(String aspect,
double sampleRate,
String... tags)
Decrements the specified counter by one.
|
void |
decrementCounter(String aspect,
String... tags)
Decrements the specified counter by one.
|
void |
distribution(String aspect,
double value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordDistributionValue(String, double, double, String[]) . |
void |
distribution(String aspect,
double value,
String... tags)
Convenience method equivalent to
recordDistributionValue(String, double, String[]) . |
void |
distribution(String aspect,
long value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordDistributionValue(String, long, double, String[]) . |
void |
distribution(String aspect,
long value,
String... tags)
Convenience method equivalent to
recordDistributionValue(String, long, String[]) . |
void |
gauge(String aspect,
double value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordGaugeValue(String, double, double, String[]) . |
void |
gauge(String aspect,
double value,
String... tags)
Convenience method equivalent to
recordGaugeValue(String, double, String[]) . |
void |
gauge(String aspect,
long value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordGaugeValue(String, long, double, String[]) . |
void |
gauge(String aspect,
long value,
String... tags)
Convenience method equivalent to
recordGaugeValue(String, long, String[]) . |
void |
gaugeWithTimestamp(String aspect,
double value,
long timestamp,
String... tags)
Set the gauge metric at the given time to the specified value.
|
void |
gaugeWithTimestamp(String aspect,
long value,
long timestamp,
String... tags)
Set the gauge metric at the given time to the specified value.
|
void |
histogram(String aspect,
double value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordHistogramValue(String, double, double, String[]) . |
void |
histogram(String aspect,
double value,
String... tags)
Convenience method equivalent to
recordHistogramValue(String, double, String[]) . |
void |
histogram(String aspect,
long value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordHistogramValue(String, long, double, String[]) . |
void |
histogram(String aspect,
long value,
String... tags)
Convenience method equivalent to
recordHistogramValue(String, long, String[]) . |
void |
increment(String aspect,
double sampleRate,
String... tags)
Convenience method equivalent to
incrementCounter(String, double, String[]) . |
void |
increment(String aspect,
String... tags)
Convenience method equivalent to
incrementCounter(String, String[]) . |
void |
incrementCounter(String aspect,
double sampleRate,
String... tags)
Increments the specified counter by one.
|
void |
incrementCounter(String aspect,
String... tags)
Increments the specified counter by one.
|
void |
recordDistributionValue(String aspect,
double value,
double sampleRate,
String... tags)
Records a value for the specified named distribution.
|
void |
recordDistributionValue(String aspect,
double value,
String... tags)
Records a value for the specified named distribution.
|
void |
recordDistributionValue(String aspect,
long value,
double sampleRate,
String... tags)
Records a value for the specified named distribution.
|
void |
recordDistributionValue(String aspect,
long value,
String... tags)
Records a value for the specified named distribution.
|
void |
recordEvent(Event event,
String... tags)
Records an event.
|
void |
recordExecutionTime(String aspect,
long timeInMs,
double sampleRate,
String... tags)
Records an execution time in milliseconds for the specified named operation.
|
void |
recordExecutionTime(String aspect,
long timeInMs,
String... tags)
Records an execution time in milliseconds for the specified named operation.
|
void |
recordGaugeValue(String aspect,
double value,
double sampleRate,
String... tags)
Records the latest fixed value for the specified named gauge.
|
void |
recordGaugeValue(String aspect,
double value,
String... tags)
Records the latest fixed value for the specified named gauge.
|
void |
recordGaugeValue(String aspect,
long value,
double sampleRate,
String... tags)
Records the latest fixed value for the specified named gauge.
|
void |
recordGaugeValue(String aspect,
long value,
String... tags)
Records the latest fixed value for the specified named gauge.
|
void |
recordHistogramValue(String aspect,
double value,
double sampleRate,
String... tags)
Records a value for the specified named histogram.
|
void |
recordHistogramValue(String aspect,
double value,
String... tags)
Records a value for the specified named histogram.
|
void |
recordHistogramValue(String aspect,
long value,
double sampleRate,
String... tags)
Records a value for the specified named histogram.
|
void |
recordHistogramValue(String aspect,
long value,
String... tags)
Records a value for the specified named histogram.
|
void |
recordServiceCheckRun(ServiceCheck sc)
Records a run status for the specified named service check.
|
void |
recordSetValue(String aspect,
String value,
String... tags)
Records a value for the specified set.
|
void |
serviceCheck(ServiceCheck sc)
Convenience method equivalent to
recordServiceCheckRun(ServiceCheck sc) . |
void |
stop()
Cleanly shut down this StatsD client.
|
void |
time(String aspect,
long value,
double sampleRate,
String... tags)
Convenience method equivalent to
recordExecutionTime(String, long, double, String[]) . |
void |
time(String aspect,
long value,
String... tags)
Convenience method equivalent to
recordExecutionTime(String, long, String[]) . |
void stop()
void close()
close
in interface AutoCloseable
close
in interface Closeable
stop()
void count(String aspect, long delta, String... tags)
This method is a DataDog extension, and may not work with other servers.
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 bytags
- array of tags to be added to the datavoid count(String aspect, long delta, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
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
- percentage of time metric to be senttags
- array of tags to be added to the datavoid count(String aspect, double delta, String... tags)
This method is a DataDog extension, and may not work with other servers.
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 bytags
- array of tags to be added to the datavoid count(String aspect, double delta, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
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
- percentage of time metric to be senttags
- array of tags to be added to the datavoid countWithTimestamp(String aspect, long value, long timestamp, String... tags)
Values with an explicit timestamp are never aggregated and will be recorded as the metric value at the given time.
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the counter to adjustvalue
- the amount to adjust the counter bytimestamp
- timestamp of the value, as seconds from the epoch of 1970-01-01T00:00:00Ztags
- array of tags to be added to the datavoid countWithTimestamp(String aspect, double value, long timestamp, String... tags)
Values with an explicit timestamp are never aggregated and will be recorded as the metric value at the given time.
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the counter to adjustvalue
- the amount to adjust the counter bytimestamp
- timestamp of the value, as seconds from the epoch of 1970-01-01T00:00:00Ztags
- array of tags to be added to the datavoid incrementCounter(String aspect, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the counter to incrementtags
- array of tags to be added to the datavoid incrementCounter(String aspect, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the counter to incrementsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid increment(String aspect, String... tags)
incrementCounter(String, String[])
.aspect
- the name of the counter to incrementtags
- array of tags to be added to the datavoid increment(String aspect, double sampleRate, String... tags)
incrementCounter(String, double, String[])
.aspect
- the name of the counter to incrementsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid decrementCounter(String aspect, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the counter to decrementtags
- array of tags to be added to the datavoid decrementCounter(String aspect, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the counter to decrementsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid decrement(String aspect, String... tags)
decrementCounter(String, String[])
.aspect
- the name of the counter to decrementtags
- array of tags to be added to the datavoid decrement(String aspect, double sampleRate, String... tags)
decrementCounter(String, double, String[])
.aspect
- the name of the counter to decrementsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordGaugeValue(String aspect, double value, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the gaugevalue
- the new reading of the gaugetags
- array of tags to be added to the datavoid recordGaugeValue(String aspect, double value, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the gaugevalue
- the new reading of the gaugesampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordGaugeValue(String aspect, long value, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the gaugevalue
- the new reading of the gaugetags
- array of tags to be added to the datavoid recordGaugeValue(String aspect, long value, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the gaugevalue
- the new reading of the gaugesampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid gauge(String aspect, double value, String... tags)
recordGaugeValue(String, double, String[])
.aspect
- the name of the gaugevalue
- the new reading of the gaugetags
- array of tags to be added to the datavoid gauge(String aspect, double value, double sampleRate, String... tags)
recordGaugeValue(String, double, double, String[])
.aspect
- the name of the gaugevalue
- the new reading of the gaugesampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid gauge(String aspect, long value, String... tags)
recordGaugeValue(String, long, String[])
.aspect
- the name of the gaugevalue
- the new reading of the gaugetags
- array of tags to be added to the datavoid gauge(String aspect, long value, double sampleRate, String... tags)
recordGaugeValue(String, long, double, String[])
.aspect
- the name of the gaugevalue
- the new reading of the gaugesampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid gaugeWithTimestamp(String aspect, double value, long timestamp, String... tags)
Values with an explicit timestamp are never aggregated and will be recorded as the metric value at the given time.
aspect
- the name of the gaugevalue
- the new reading of the gaugetimestamp
- timestamp of the value, as seconds from the epoch of 1970-01-01T00:00:00Ztags
- array of tags to be added to the datavoid gaugeWithTimestamp(String aspect, long value, long timestamp, String... tags)
Values with an explicit timestamp are never aggregated and will be recorded as the metric value at the given time.
aspect
- the name of the gaugevalue
- the new reading of the gaugetimestamp
- timestamp of the value, as seconds from the epoch of 1970-01-01T00:00:00Ztags
- array of tags to be added to the datavoid recordExecutionTime(String aspect, long timeInMs, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the timed operationtimeInMs
- the time in millisecondstags
- array of tags to be added to the datavoid recordExecutionTime(String aspect, long timeInMs, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the timed operationtimeInMs
- the time in millisecondssampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid time(String aspect, long value, String... tags)
recordExecutionTime(String, long, String[])
.aspect
- the name of the timed operationvalue
- the time in millisecondstags
- array of tags to be added to the datavoid time(String aspect, long value, double sampleRate, String... tags)
recordExecutionTime(String, long, double, String[])
.aspect
- the name of the timed operationvalue
- the time in millisecondssampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordHistogramValue(String aspect, double value, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramtags
- array of tags to be added to the datavoid recordHistogramValue(String aspect, double value, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordHistogramValue(String aspect, long value, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramtags
- array of tags to be added to the datavoid recordHistogramValue(String aspect, long value, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid histogram(String aspect, double value, String... tags)
recordHistogramValue(String, double, String[])
.aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramtags
- array of tags to be added to the datavoid histogram(String aspect, double value, double sampleRate, String... tags)
recordHistogramValue(String, double, double, String[])
.aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid histogram(String aspect, long value, String... tags)
recordHistogramValue(String, long, String[])
.aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramtags
- array of tags to be added to the datavoid histogram(String aspect, long value, double sampleRate, String... tags)
recordHistogramValue(String, long, double, String[])
.aspect
- the name of the histogramvalue
- the value to be incorporated in the histogramsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordDistributionValue(String aspect, double value, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the distributionvalue
- the value to be incorporated in the distributiontags
- array of tags to be added to the datavoid recordDistributionValue(String aspect, double value, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the distributionvalue
- the value to be incorporated in the distributionsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordDistributionValue(String aspect, long value, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the distributionvalue
- the value to be incorporated in the distributiontags
- array of tags to be added to the datavoid recordDistributionValue(String aspect, long value, double sampleRate, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the distributionvalue
- the value to be incorporated in the distributionsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid distribution(String aspect, double value, String... tags)
recordDistributionValue(String, double, String[])
.aspect
- the name of the distributionvalue
- the value to be incorporated in the distributiontags
- array of tags to be added to the datavoid distribution(String aspect, double value, double sampleRate, String... tags)
recordDistributionValue(String, double, double, String[])
.aspect
- the name of the distributionvalue
- the value to be incorporated in the distributionsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid distribution(String aspect, long value, String... tags)
recordDistributionValue(String, long, String[])
.aspect
- the name of the distributionvalue
- the value to be incorporated in the distributiontags
- array of tags to be added to the datavoid distribution(String aspect, long value, double sampleRate, String... tags)
recordDistributionValue(String, long, double, String[])
.aspect
- the name of the distributionvalue
- the value to be incorporated in the distributionsampleRate
- percentage of time metric to be senttags
- array of tags to be added to the datavoid recordEvent(Event event, String... tags)
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
event
- The event to recordtags
- array of tags to be added to the datavoid recordServiceCheckRun(ServiceCheck sc)
sc
- the service check objectvoid serviceCheck(ServiceCheck sc)
recordServiceCheckRun(ServiceCheck sc)
.sc
- the service check objectvoid recordSetValue(String aspect, String value, String... tags)
Sets are used to count the number of unique elements in a group. If you want to track the number of unique visitor to your site, sets are a great way to do that.
This method is a DataDog extension, and may not work with other servers.
This method is non-blocking and is guaranteed not to throw an exception.
aspect
- the name of the setvalue
- the value to tracktags
- array of tags to be added to the dataCopyright © 2023. All rights reserved.