diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/DynamoDbAttributesExtractor.java b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/DynamoDbAttributesExtractor.java index fdb77cdf788e..db0a1832e162 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/DynamoDbAttributesExtractor.java +++ b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/DynamoDbAttributesExtractor.java @@ -18,6 +18,7 @@ public class DynamoDbAttributesExtractor implements AttributesExtractor, Response> { + // copied from DbIncubatingAttributes.DbSystemIncubatingValues private static final AttributeKey DB_SYSTEM = AttributeKey.stringKey("db.system"); private static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = AttributeKey.stringArrayKey("aws.dynamodb.table_names"); diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/TracingRequestHandler.java b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/TracingRequestHandler.java index 407593a079d0..49b9c5a626f4 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/TracingRequestHandler.java +++ b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/TracingRequestHandler.java @@ -31,9 +31,9 @@ final class TracingRequestHandler extends RequestHandler2 { ContextKey.named(TracingRequestHandler.class.getName() + ".Timer"); private static final ContextKey REQUEST_SPAN_SUPPRESSED_KEY = ContextKey.named(TracingRequestHandler.class.getName() + ".RequestSpanSuppressed"); - private static final String SEND_MESSAGE_REQUEST = + private static final String SEND_MESSAGE_REQUEST_CLASS = "com.amazonaws.services.sqs.model.SendMessageRequest"; - private static final String DYNAMODBV2 = "com.amazonaws.services.dynamodbv2.model."; + private static final String DYNAMODBV2_CLASS_PREFIX = "com.amazonaws.services.dynamodbv2.model."; private final Instrumenter, Response> requestInstrumenter; private final Instrumenter> consumerReceiveInstrumenter; @@ -162,10 +162,10 @@ private void finish(Request request, Response response, @Nullable Throwabl private Instrumenter, Response> getInstrumenter(Request request) { String className = request.getOriginalRequest().getClass().getName(); - if (className.startsWith(DYNAMODBV2)) { + if (className.startsWith(DYNAMODBV2_CLASS_PREFIX)) { return dynamoDbInstrumenter; } - if (className.equals(SEND_MESSAGE_REQUEST)) { + if (className.equals(SEND_MESSAGE_REQUEST_CLASS)) { return producerInstrumenter; } return requestInstrumenter;