From c221fbe1a7a97adcd906404a0b4cf0c08b5d4082 Mon Sep 17 00:00:00 2001 From: thomasduncan Date: Thu, 21 Dec 2023 15:20:17 -0800 Subject: [PATCH] Fix spotless check errors. --- .../awssdk/v1_11/AwsSdkInstrumenterFactory.java | 16 ++++++++-------- .../awssdk/v1_11/SnsAttributesExtractor.java | 13 +++++++++++-- .../awssdk/v2_2/AwsSdkRequestType.java | 6 ++---- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkInstrumenterFactory.java b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkInstrumenterFactory.java index a481f08d553b..16ef43d40961 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkInstrumenterFactory.java +++ b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkInstrumenterFactory.java @@ -42,15 +42,15 @@ final class AwsSdkInstrumenterFactory { private static final SnsAttributesExtractor snsAttributesExtractor = new SnsAttributesExtractor(); private static final List, Response>> - defaultAttributesExtractors = Arrays.asList( - httpAttributesExtractor, rpcAttributesExtractor, snsAttributesExtractor); + defaultAttributesExtractors = + Arrays.asList(httpAttributesExtractor, rpcAttributesExtractor, snsAttributesExtractor); private static final List, Response>> - extendedAttributesExtractors = Arrays.asList( - httpAttributesExtractor, - rpcAttributesExtractor, - snsAttributesExtractor, - experimentalAttributesExtractor - ); + extendedAttributesExtractors = + Arrays.asList( + httpAttributesExtractor, + rpcAttributesExtractor, + snsAttributesExtractor, + experimentalAttributesExtractor); private static final AwsSdkSpanNameExtractor spanName = new AwsSdkSpanNameExtractor(); private final OpenTelemetry openTelemetry; diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/SnsAttributesExtractor.java b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/SnsAttributesExtractor.java index 3a951a71f4e4..ca7ea4e2f662 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/SnsAttributesExtractor.java +++ b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/SnsAttributesExtractor.java @@ -1,3 +1,8 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + package io.opentelemetry.instrumentation.awssdk.v1_11; import com.amazonaws.AmazonWebServiceRequest; @@ -31,6 +36,10 @@ private static String findMessageDestination(AmazonWebServiceRequest request) { } @Override - public void onEnd(AttributesBuilder attributes, Context context, Request request, - @Nullable Response response, @Nullable Throwable error) {} + public void onEnd( + AttributesBuilder attributes, + Context context, + Request request, + @Nullable Response response, + @Nullable Throwable error) {} } diff --git a/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRequestType.java b/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRequestType.java index d1b9e4288b4e..6a2d42607590 100644 --- a/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRequestType.java +++ b/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRequestType.java @@ -5,10 +5,9 @@ package io.opentelemetry.instrumentation.awssdk.v2_2; -import io.opentelemetry.semconv.SemanticAttributes; - import static io.opentelemetry.instrumentation.awssdk.v2_2.FieldMapping.request; +import io.opentelemetry.semconv.SemanticAttributes; import java.util.Collections; import java.util.List; import java.util.Map; @@ -20,8 +19,7 @@ enum AwsSdkRequestType { DYNAMODB(request("aws.table.name", "TableName")), SNS( request(SemanticAttributes.MESSAGING_DESTINATION_NAME.getKey(), "TargetArn"), - request(SemanticAttributes.MESSAGING_DESTINATION_NAME.getKey(), "TopicArn") - ); + request(SemanticAttributes.MESSAGING_DESTINATION_NAME.getKey(), "TopicArn")); // Wrapping in unmodifiableMap @SuppressWarnings("ImmutableEnumChecker")