Skip to content

Commit 1b0a198

Browse files
committed
naming nits
1 parent 61c014c commit 1b0a198

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ Instrumenter<Request<?>, Response<?>> producerInstrumenter() {
186186
true);
187187
}
188188

189-
Instrumenter<Request<?>, Response<?>> dynamoInstrumenter() {
190-
DynamoAttributesExtractor dynamoAttributesExtractor = new DynamoAttributesExtractor();
189+
Instrumenter<Request<?>, Response<?>> dynamoDbInstrumenter() {
190+
DynamoDbAttributesExtractor dynamoDbAttributesExtractor = new DynamoDbAttributesExtractor();
191191

192192
return createInstrumenter(
193193
openTelemetry,
194194
spanName,
195195
SpanKindExtractor.alwaysClient(),
196196
attributesExtractors(),
197-
singletonList(dynamoAttributesExtractor),
197+
singletonList(dynamoDbAttributesExtractor),
198198
true);
199199
}
200200

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static AwsSdkTelemetryBuilder builder(OpenTelemetry openTelemetry) {
4949
private final Instrumenter<SqsReceiveRequest, Response<?>> consumerReceiveInstrumenter;
5050
private final Instrumenter<SqsProcessRequest, Response<?>> consumerProcessInstrumenter;
5151
private final Instrumenter<Request<?>, Response<?>> producerInstrumenter;
52-
private final Instrumenter<Request<?>, Response<?>> dynamoInstrumenter;
52+
private final Instrumenter<Request<?>, Response<?>> dynamoDbInstrumenter;
5353

5454
AwsSdkTelemetry(
5555
OpenTelemetry openTelemetry,
@@ -66,7 +66,7 @@ public static AwsSdkTelemetryBuilder builder(OpenTelemetry openTelemetry) {
6666
consumerReceiveInstrumenter = instrumenterFactory.consumerReceiveInstrumenter();
6767
consumerProcessInstrumenter = instrumenterFactory.consumerProcessInstrumenter();
6868
producerInstrumenter = instrumenterFactory.producerInstrumenter();
69-
dynamoInstrumenter = instrumenterFactory.dynamoInstrumenter();
69+
dynamoDbInstrumenter = instrumenterFactory.dynamoDbInstrumenter();
7070
}
7171

7272
/**
@@ -79,6 +79,6 @@ public RequestHandler2 newRequestHandler() {
7979
consumerReceiveInstrumenter,
8080
consumerProcessInstrumenter,
8181
producerInstrumenter,
82-
dynamoInstrumenter);
82+
dynamoDbInstrumenter);
8383
}
8484
}
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.util.List;
1717
import javax.annotation.Nullable;
1818

19-
public class DynamoAttributesExtractor implements AttributesExtractor<Request<?>, Response<?>> {
19+
public class DynamoDbAttributesExtractor implements AttributesExtractor<Request<?>, Response<?>> {
2020

2121
private static final AttributeKey<String> DB_SYSTEM = AttributeKey.stringKey("db.system");
2222
private static final AttributeKey<List<String>> AWS_TABLE_NAMES =

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ final class TracingRequestHandler extends RequestHandler2 {
3939
private final Instrumenter<SqsReceiveRequest, Response<?>> consumerReceiveInstrumenter;
4040
private final Instrumenter<SqsProcessRequest, Response<?>> consumerProcessInstrumenter;
4141
private final Instrumenter<Request<?>, Response<?>> producerInstrumenter;
42-
private final Instrumenter<Request<?>, Response<?>> dynamoInstrumenter;
42+
private final Instrumenter<Request<?>, Response<?>> dynamoDbInstrumenter;
4343

4444
TracingRequestHandler(
4545
Instrumenter<Request<?>, Response<?>> requestInstrumenter,
4646
Instrumenter<SqsReceiveRequest, Response<?>> consumerReceiveInstrumenter,
4747
Instrumenter<SqsProcessRequest, Response<?>> consumerProcessInstrumenter,
4848
Instrumenter<Request<?>, Response<?>> producerInstrumenter,
49-
Instrumenter<Request<?>, Response<?>> dynamoInstrumenter) {
49+
Instrumenter<Request<?>, Response<?>> dynamoDbInstrumenter) {
5050
this.requestInstrumenter = requestInstrumenter;
5151
this.consumerReceiveInstrumenter = consumerReceiveInstrumenter;
5252
this.consumerProcessInstrumenter = consumerProcessInstrumenter;
5353
this.producerInstrumenter = producerInstrumenter;
54-
this.dynamoInstrumenter = dynamoInstrumenter;
54+
this.dynamoDbInstrumenter = dynamoDbInstrumenter;
5555
}
5656

5757
@Override
@@ -163,7 +163,7 @@ private void finish(Request<?> request, Response<?> response, @Nullable Throwabl
163163
private Instrumenter<Request<?>, Response<?>> getInstrumenter(Request<?> request) {
164164
String className = request.getOriginalRequest().getClass().getName();
165165
if (className.startsWith(DYNAMODBV2)) {
166-
return dynamoInstrumenter;
166+
return dynamoDbInstrumenter;
167167
} else if (className.equals(SEND_MESSAGE_REQUEST)) {
168168
return producerInstrumenter;
169169
}

instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractS3ClientTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import static io.opentelemetry.semconv.incubating.RpcIncubatingAttributes.RPC_METHOD;
1919
import static io.opentelemetry.semconv.incubating.RpcIncubatingAttributes.RPC_SERVICE;
2020
import static io.opentelemetry.semconv.incubating.RpcIncubatingAttributes.RPC_SYSTEM;
21+
import static java.util.Collections.singletonList;
2122
import static org.assertj.core.api.Assertions.assertThat;
2223
import static org.assertj.core.api.Assertions.catchThrowable;
2324

@@ -34,7 +35,6 @@
3435
import io.opentelemetry.testing.internal.armeria.common.HttpStatus;
3536
import io.opentelemetry.testing.internal.armeria.common.MediaType;
3637
import java.time.Duration;
37-
import java.util.Collections;
3838
import java.util.List;
3939
import java.util.function.Function;
4040
import java.util.stream.Stream;
@@ -83,12 +83,12 @@ private static Stream<Arguments> provideArguments() {
8383
"CreateBucket",
8484
"PUT",
8585
(Function<AmazonS3, Object>) c -> c.createBucket("testbucket"),
86-
Collections.singletonList(createStringKeyPair("aws.bucket.name", "testbucket"))),
86+
singletonList(createStringKeyPair("aws.bucket.name", "testbucket"))),
8787
Arguments.of(
8888
"GetObject",
8989
"GET",
9090
(Function<AmazonS3, Object>) c -> c.getObject("someBucket", "someKey"),
91-
Collections.singletonList(createStringKeyPair("aws.bucket.name", "someBucket"))));
91+
singletonList(createStringKeyPair("aws.bucket.name", "someBucket"))));
9292
}
9393

9494
@Test

0 commit comments

Comments
 (0)