public class CloudWatchReporterBuilder
extends java.lang.Object
CloudWatchReporter. withNamespace(String) is required. There
are suitable defaults for all other fields.| Constructor and Description |
|---|
CloudWatchReporterBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CloudWatchReporter |
build() |
CloudWatchReporterBuilder |
copy() |
CloudWatchReporterBuilder |
withClient(com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync client) |
CloudWatchReporterBuilder |
withDimensions(java.lang.String dimensions) |
CloudWatchReporterBuilder |
withFilter(com.codahale.metrics.MetricFilter filter) |
CloudWatchReporterBuilder |
withNamespace(java.lang.String namespace) |
CloudWatchReporterBuilder |
withRegistry(com.codahale.metrics.MetricRegistry registry) |
CloudWatchReporterBuilder |
withReporterFilter(com.google.common.base.Predicate<com.amazonaws.services.cloudwatch.model.MetricDatum> reporterFilter)
This filter is applied right before submission to CloudWatch.
|
CloudWatchReporterBuilder |
withTimestampLocal(java.lang.Boolean timestampLocal) |
CloudWatchReporterBuilder |
withTypeDimName(java.lang.String typeDimName) |
CloudWatchReporterBuilder |
withTypeDimValCounterCount(java.lang.String typeDimValCounterCount) |
CloudWatchReporterBuilder |
withTypeDimValGauge(java.lang.String typeDimValGauge) |
CloudWatchReporterBuilder |
withTypeDimValHistoSamples(java.lang.String typeDimValHistoSamples) |
CloudWatchReporterBuilder |
withTypeDimValHistoStats(java.lang.String typeDimValHistoStats) |
CloudWatchReporterBuilder |
withTypeDimValMeterCount(java.lang.String typeDimValMeterCount) |
CloudWatchReporterBuilder |
withTypeDimValTimerSamples(java.lang.String typeDimValTimerSamples) |
CloudWatchReporterBuilder |
withTypeDimValTimerStats(java.lang.String typeDimValTimerStats) |
public CloudWatchReporterBuilder withRegistry(com.codahale.metrics.MetricRegistry registry)
registry - of metrics for CloudWatchReporter to submitpublic CloudWatchReporterBuilder withNamespace(java.lang.String namespace)
namespace - metric namespace to use when submitting metrics to CloudWatchpublic CloudWatchReporterBuilder withClient(com.amazonaws.services.cloudwatch.AmazonCloudWatchAsync client)
client - CloudWatch clientpublic CloudWatchReporterBuilder withFilter(com.codahale.metrics.MetricFilter filter)
filter - which returns true for metrics that should be sent to CloudWatchpublic CloudWatchReporterBuilder withDimensions(java.lang.String dimensions)
dimensions - global dimensions in the form name=value that should be appended to all metrics submitted to
CloudWatchpublic CloudWatchReporterBuilder withTimestampLocal(java.lang.Boolean timestampLocal)
timestampLocal - whether or not to explicitly timestamp metric data to now (true), or leave it null so that
CloudWatch will timestamp it on receipt (false)public CloudWatchReporterBuilder withTypeDimName(java.lang.String typeDimName)
typeDimName - name of the "metric type" dimension added to CloudWatch submissions.
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValGauge(java.lang.String typeDimValGauge)
typeDimValGauge - value of the "metric type" dimension added to CloudWatch submissions of Gauges.
Defaults to
when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValCounterCount(java.lang.String typeDimValCounterCount)
typeDimValCounterCount - value of the "metric type" dimension added to CloudWatch submissions of
Counter.getCount().
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValMeterCount(java.lang.String typeDimValMeterCount)
typeDimValMeterCount - value of the "metric type" dimension added to CloudWatch submissions of
Meter.getCount().
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValHistoSamples(java.lang.String typeDimValHistoSamples)
typeDimValHistoSamples - value of the "metric type" dimension added to CloudWatch submissions of
Histogram.getCount().
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValHistoStats(java.lang.String typeDimValHistoStats)
typeDimValHistoStats - value of the "metric type" dimension added to CloudWatch submissions of
Histogram.getSnapshot().
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValTimerSamples(java.lang.String typeDimValTimerSamples)
typeDimValTimerSamples - value of the "metric type" dimension added to CloudWatch submissions of
Timer.getCount().
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withTypeDimValTimerStats(java.lang.String typeDimValTimerStats)
typeDimValTimerStats - value of the "metric type" dimension added to CloudWatch submissions of
Timer.getSnapshot().
Defaults to when using the CloudWatchReporterBuilderpublic CloudWatchReporterBuilder withReporterFilter(com.google.common.base.Predicate<com.amazonaws.services.cloudwatch.model.MetricDatum> reporterFilter)
MetricDatum.getDimensions(). true means to keep and submit the metric. false means to exclude it.
Different from MetricFilter in that
MetricFilter must operate on the encoded, single-string name (see MetricFilter.matches(String, Metric)),
and this filter is applied before ScheduledReporter.report(SortedMap, SortedMap, SortedMap, SortedMap, SortedMap) so that
filtered metrics never reach that method in CloudWatchReporter.
Defaults to Predicates.alwaysTrue() - i.e. do not remove any metrics from the submission due to this
particular filter.
reporterFilter - to replace 'alwaysTrue()'public CloudWatchReporterBuilder copy()
public CloudWatchReporter build()