Class EmfMetricLoggingPublisher.Builder
- Enclosing class:
EmfMetricLoggingPublisher
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aEmfMetricLoggingPublisher
using the configuration currently configured on this publisher.dimensions
(Collection<SdkMetric<String>> dimensions) Configure theSdkMetric
that are used to define the Dimension Set Array that will be put into the emf log to this publisher.dimensions
(SdkMetric<String>... dimensions) logGroupName
(String logGroupName) Configure the LogGroupName key that will be put into the emf log to this publisher.metricCategories
(Collection<MetricCategory> metricCategories) Configure theMetricCategory
s that should be uploaded to CloudWatch.metricCategories
(MetricCategory... metricCategories) metricLevel
(MetricLevel metricLevel) Configure theMetricLevel
that should be uploaded to CloudWatch.Configure the namespace that will be put into the emf log to this publisher.
-
Method Details
-
namespace
Configure the namespace that will be put into the emf log to this publisher.If this is not specified,
AwsSdk/JavaSdk2
will be used. -
dimensions
Configure theSdkMetric
that are used to define the Dimension Set Array that will be put into the emf log to this publisher.If this is not specified,
CoreMetric.SERVICE_ID
andCoreMetric.OPERATION_NAME
will be used. -
dimensions
@SafeVarargs public final EmfMetricLoggingPublisher.Builder dimensions(SdkMetric<String>... dimensions) - See Also:
-
metricCategories
public EmfMetricLoggingPublisher.Builder metricCategories(Collection<MetricCategory> metricCategories) Configure theMetricCategory
s that should be uploaded to CloudWatch.If this is not specified,
MetricCategory.ALL
is used.All
SdkMetric
s are associated with at least oneMetricCategory
. This setting determines which category of metrics uploaded to CloudWatch. Any metricsEmfMetricLoggingPublisher.publish(MetricCollection)
ed that do not fall under these configured categories are ignored.Note: If there are
dimensions(Collection)
configured that do not fall under theseMetricCategory
values, the dimensions will NOT be ignored. In other words, the metric category configuration only affects which metrics are uploaded to CloudWatch, not which values can be used fordimensions
. -
metricCategories
- See Also:
-
logGroupName
Configure the LogGroupName key that will be put into the emf log to this publisher. This is required when using the CloudWatch agent to send embedded metric format logs that tells the agent which log group to use.If this is not specified, for AWS lambda environments,
AWS_LAMBDA_LOG_GROUP_NAME
is used. This field is required and must not be null or empty for non-lambda environments.- Throws:
NullPointerException
- if non-lambda environment and logGroupName is null
-
metricLevel
Configure theMetricLevel
that should be uploaded to CloudWatch.If this is not specified,
MetricLevel.INFO
is used.All
SdkMetric
s are associated with oneMetricLevel
. This setting determines which level of metrics uploaded to CloudWatch. Any metricsEmfMetricLoggingPublisher.publish(MetricCollection)
ed that do not fall under these configured categories are ignored.Note: If there are
dimensions(Collection)
configured that do not fall under thisMetricLevel
values, the dimensions will NOT be ignored. In other words, the metric category configuration only affects which metrics are uploaded to CloudWatch, not which values can be used fordimensions
. -
build
Build aEmfMetricLoggingPublisher
using the configuration currently configured on this publisher.
-