Class EmfMetricLoggingPublisher.Builder
- Enclosing class:
EmfMetricLoggingPublisher
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aEmfMetricLoggingPublisherusing the configuration currently configured on this publisher.dimensions(Collection<SdkMetric<String>> dimensions) Configure theSdkMetricthat 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 theMetricCategorys that should be uploaded to CloudWatch.metricCategories(MetricCategory... metricCategories) metricLevel(MetricLevel metricLevel) Configure theMetricLevelthat 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/JavaSdk2will be used. -
dimensions
Configure theSdkMetricthat 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_IDandCoreMetric.OPERATION_NAMEwill be used. -
dimensions
@SafeVarargs public final EmfMetricLoggingPublisher.Builder dimensions(SdkMetric<String>... dimensions) - See Also:
-
metricCategories
public EmfMetricLoggingPublisher.Builder metricCategories(Collection<MetricCategory> metricCategories) Configure theMetricCategorys that should be uploaded to CloudWatch.If this is not specified,
MetricCategory.ALLis used.All
SdkMetrics 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 theseMetricCategoryvalues, 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_NAMEis 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 theMetricLevelthat should be uploaded to CloudWatch.If this is not specified,
MetricLevel.INFOis used.All
SdkMetrics 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 thisMetricLevelvalues, 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 aEmfMetricLoggingPublisherusing the configuration currently configured on this publisher.
-