From a4736b3e599f21ec32c80707fd0c088b7c13b6db Mon Sep 17 00:00:00 2001 From: Zoe Wang <33073555+zoewangg@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:27:25 -0700 Subject: [PATCH] Fix javadocs --- .../cloudwatch/CloudWatchMetricPublisher.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/metric-publishers/cloudwatch-metric-publisher/src/main/java/software/amazon/awssdk/metrics/publishers/cloudwatch/CloudWatchMetricPublisher.java b/metric-publishers/cloudwatch-metric-publisher/src/main/java/software/amazon/awssdk/metrics/publishers/cloudwatch/CloudWatchMetricPublisher.java index 565ac92f55d7..93049995cfe1 100644 --- a/metric-publishers/cloudwatch-metric-publisher/src/main/java/software/amazon/awssdk/metrics/publishers/cloudwatch/CloudWatchMetricPublisher.java +++ b/metric-publishers/cloudwatch-metric-publisher/src/main/java/software/amazon/awssdk/metrics/publishers/cloudwatch/CloudWatchMetricPublisher.java @@ -42,6 +42,7 @@ import software.amazon.awssdk.annotations.Immutable; import software.amazon.awssdk.annotations.SdkPublicApi; import software.amazon.awssdk.annotations.ThreadSafe; +import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; import software.amazon.awssdk.core.metrics.CoreMetric; import software.amazon.awssdk.metrics.MetricCategory; import software.amazon.awssdk.metrics.MetricCollection; @@ -91,8 +92,16 @@ * *
Configuring AWS SDK clients to upload client metrics * - * TODO + *
+ * Create a {@link CloudWatchMetricPublisher}, and configure it via + * {@link ClientOverrideConfiguration.Builder#addMetricPublisher(MetricPublisher)} * + *
+ * CloudWatchMetricPublisher cloudWatchMetricPublisher = CloudWatchMetricPublisher.create(); + * S3Client s3 = S3Client.builder() + * .overrideConfiguration(o -> o.addMetricPublisher(cloudWatchMetricPublisher)) + * .build(); + **
Uploading your own custom metrics * * Step 1: Define which metrics you wish to collect