Package io.avaje.metrics.statsd
Interface StatsdReporter.Builder
- Enclosing interface:
StatsdReporter
public static interface StatsdReporter.Builder
Builder for the StatsdReporter.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the reporter.client(com.timgroup.statsd.StatsDClient client) Specify the StatsD client to use.database(io.ebean.Database database) Add a database to report on.databaseVerbose(io.ebean.Database database) Add a database to report on with verbose metrics.Specify the hostname to use.port(int port) Specify the port to use.registry(MetricRegistry registry) Specify the Metrics registry to use.reporter(StatsdReporter.Reporter reporter) Add an additional custom reporter.Specify the schedule in seconds.Specify the common tags to be used on all the reported metrics.timedThresholdMicros(long timedThreshold) Specify the threshold in microseconds for timed metrics to be reported.
-
Method Details
-
hostname
Specify the hostname to use. Default is localhost. -
port
Specify the port to use. Default is 8125. -
tags
Specify the common tags to be used on all the reported metrics. Default is no tags. -
client
Specify the StatsD client to use. Default is a NonBlockingStatsDClient.When using a custom client, the hostname, port and tags are not used.
-
timedThresholdMicros
Specify the threshold in microseconds for timed metrics to be reported. Default is 0.Set this to reduce the number of metrics reported for timed metrics.
For example, if set to 10_000, metrics with a duration less than 10 milliseconds will not be reported.
-
schedule
Specify the schedule in seconds. Default is 60 seconds. -
registry
Specify the Metrics registry to use. If not specified the global registry is used. -
database
Add a database to report on. -
databaseVerbose
Add a database to report on with verbose metrics. -
reporter
Add an additional custom reporter. -
build
StatsdReporter build()Build the reporter.
-