public class CloudWatchReporter
extends com.codahale.metrics.ScheduledReporter
METRIC_TYPE_DIMENSION. This corresponds
to a type of metric submissions to CloudWatch.
Refer to [README.md](https://github.com/blacklocus/metrics-cloudwatch/blob/master/README.md) for documentation on metric submission types.
Refer to [README.md](https://github.com/blacklocus/metrics-cloudwatch/blob/master/README.md) for documentation on the name-encoded syntax of dimensions and permutable components.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METRIC_TYPE_DIMENSION
Key of
Dimension.name for the type of metric submission, e.g. |
static java.lang.String |
NAME_DIMENSION_SEPARATOR
Separator of key and value segments of a metric name.
|
static java.lang.String |
NAME_PERMUTE_MARKER
If any token, whether a simple string or a dimension pair ends with this marker, then metrics will be sent once
with and once without.
|
static java.lang.String |
NAME_TOKEN_DELIMITER |
static java.lang.String |
NAME_TOKEN_DELIMITER_RGX
Delimiter of tokens in the metric name.
|
static java.lang.String |
VALID_DIMENSION_PART_RGX |
static java.lang.String |
VALID_NAME_TOKEN_RGX |
| Constructor and Description |
|---|
CloudWatchReporter(com.codahale.metrics.MetricRegistry registry,
com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync cloudWatch)
Creates a new
ScheduledReporter instance. |
CloudWatchReporter(com.codahale.metrics.MetricRegistry registry,
java.lang.String metricNamespace,
com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync cloudWatch)
Creates a new
ScheduledReporter instance. |
CloudWatchReporter(com.codahale.metrics.MetricRegistry registry,
java.lang.String metricNamespace,
com.codahale.metrics.MetricFilter metricFilter,
com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync cloudWatch)
Creates a new
ScheduledReporter instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
report(java.util.SortedMap<java.lang.String,com.codahale.metrics.Gauge> gauges,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Counter> counters,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Histogram> histograms,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Meter> meters,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Timer> timers) |
public static final java.lang.String NAME_TOKEN_DELIMITER_RGX
public static final java.lang.String NAME_TOKEN_DELIMITER
public static final java.lang.String NAME_DIMENSION_SEPARATOR
Dimension.public static final java.lang.String NAME_PERMUTE_MARKER
public static final java.lang.String METRIC_TYPE_DIMENSION
Dimension.name for the type of metric submission, e.g. gauge, counterSum, meterSum, ...public static final java.lang.String VALID_NAME_TOKEN_RGX
public static final java.lang.String VALID_DIMENSION_PART_RGX
public CloudWatchReporter(com.codahale.metrics.MetricRegistry registry,
com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync cloudWatch)
ScheduledReporter instance. The reporter does not report metrics until
ScheduledReporter.start(long, TimeUnit).registry - the MetricRegistry containing the metrics this reporter will reportpublic CloudWatchReporter(com.codahale.metrics.MetricRegistry registry,
java.lang.String metricNamespace,
com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync cloudWatch)
ScheduledReporter instance. The reporter does not report metrics until
ScheduledReporter.start(long, TimeUnit).registry - the MetricRegistry containing the metrics this reporter will reportmetricNamespace - (optional) CloudWatch metric namespace that all metrics reported by this reporter will
fall underpublic CloudWatchReporter(com.codahale.metrics.MetricRegistry registry,
java.lang.String metricNamespace,
com.codahale.metrics.MetricFilter metricFilter,
com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync cloudWatch)
ScheduledReporter instance. The reporter does not report metrics until
ScheduledReporter.start(long, TimeUnit).registry - the MetricRegistry containing the metrics this reporter will reportmetricNamespace - (optional) CloudWatch metric namespace that all metrics reported by this reporter will
fall undermetricFilter - (optional) see MetricFilterpublic void report(java.util.SortedMap<java.lang.String,com.codahale.metrics.Gauge> gauges,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Counter> counters,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Histogram> histograms,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Meter> meters,
java.util.SortedMap<java.lang.String,com.codahale.metrics.Timer> timers)
report in class com.codahale.metrics.ScheduledReporter