Skip to content

Commit b86f2de

Browse files
committed
addressed nit comments
1 parent d2b7fed commit b86f2de

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/DynamoDbAttributesExtractor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
public class DynamoDbAttributesExtractor implements AttributesExtractor<Request<?>, Response<?>> {
2020

21+
// copied from DbIncubatingAttributes.DbSystemIncubatingValues
2122
private static final AttributeKey<String> DB_SYSTEM = AttributeKey.stringKey("db.system");
2223
private static final AttributeKey<List<String>> AWS_DYNAMODB_TABLE_NAMES =
2324
AttributeKey.stringArrayKey("aws.dynamodb.table_names");

instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/TracingRequestHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ final class TracingRequestHandler extends RequestHandler2 {
3131
ContextKey.named(TracingRequestHandler.class.getName() + ".Timer");
3232
private static final ContextKey<Boolean> REQUEST_SPAN_SUPPRESSED_KEY =
3333
ContextKey.named(TracingRequestHandler.class.getName() + ".RequestSpanSuppressed");
34-
private static final String SEND_MESSAGE_REQUEST =
34+
private static final String SEND_MESSAGE_REQUEST_CLASS =
3535
"com.amazonaws.services.sqs.model.SendMessageRequest";
36-
private static final String DYNAMODBV2 = "com.amazonaws.services.dynamodbv2.model.";
36+
private static final String DYNAMODBV2_CLASS_PREFIX = "com.amazonaws.services.dynamodbv2.model.";
3737

3838
private final Instrumenter<Request<?>, Response<?>> requestInstrumenter;
3939
private final Instrumenter<SqsReceiveRequest, Response<?>> consumerReceiveInstrumenter;
@@ -162,10 +162,10 @@ private void finish(Request<?> request, Response<?> response, @Nullable Throwabl
162162

163163
private Instrumenter<Request<?>, Response<?>> getInstrumenter(Request<?> request) {
164164
String className = request.getOriginalRequest().getClass().getName();
165-
if (className.startsWith(DYNAMODBV2)) {
165+
if (className.startsWith(DYNAMODBV2_CLASS_PREFIX)) {
166166
return dynamoDbInstrumenter;
167167
}
168-
if (className.equals(SEND_MESSAGE_REQUEST)) {
168+
if (className.equals(SEND_MESSAGE_REQUEST_CLASS)) {
169169
return producerInstrumenter;
170170
}
171171
return requestInstrumenter;

0 commit comments

Comments
 (0)