From 6aaf5ef9e694f1466714ebcddd37408a1559e663 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 27 Sep 2021 21:58:26 -0700 Subject: [PATCH] Remove dynamo db.name attribute (#4208) --- .../instrumentation/awssdk/v2_2/AwsSdkRequestType.java | 5 +---- .../awssdk/v2_2/AbstractAws2ClientTest.groovy | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) 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 24f3d42708c4..256c63d1a2ca 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 @@ -7,7 +7,6 @@ import static io.opentelemetry.instrumentation.awssdk.v2_2.FieldMapping.request; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.util.Collections; import java.util.List; import java.util.Map; @@ -16,9 +15,7 @@ enum AwsSdkRequestType { S3(request("aws.bucket.name", "Bucket")), SQS(request("aws.queue.url", "QueueUrl"), request("aws.queue.name", "QueueName")), Kinesis(request("aws.stream.name", "StreamName")), - DynamoDB( - request("aws.table.name", "TableName"), - request(SemanticAttributes.DB_NAME.getKey(), "TableName")); + DynamoDB(request("aws.table.name", "TableName")); // Wrapping in unmodifiableMap @SuppressWarnings("ImmutableEnumChecker") diff --git a/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy b/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy index ed840ebed80b..e685245f6f18 100644 --- a/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy @@ -170,7 +170,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { "aws.requestId" "$requestId" "aws.table.name" "sometable" "${SemanticAttributes.DB_SYSTEM.key}" "dynamodb" - "${SemanticAttributes.DB_NAME.key}" "sometable" "${SemanticAttributes.DB_OPERATION.key}" "CreateTable" "aws.dynamodb.global_secondary_indexes" "[{\"IndexName\":\"globalIndex\",\"KeySchema\":[{\"AttributeName\":\"attribute\"}],\"ProvisionedThroughput\":{\"ReadCapacityUnits\":10,\"WriteCapacityUnits\":12}},{\"IndexName\":\"globalIndexSecondary\",\"KeySchema\":[{\"AttributeName\":\"attributeSecondary\"}],\"ProvisionedThroughput\":{\"ReadCapacityUnits\":7,\"WriteCapacityUnits\":8}}]" "aws.dynamodb.provisioned_throughput.read_capacity_units" "1" @@ -206,7 +205,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { "aws.requestId" "$requestId" "aws.table.name" "sometable" "${SemanticAttributes.DB_SYSTEM.key}" "dynamodb" - "${SemanticAttributes.DB_NAME.key}" "sometable" "${SemanticAttributes.DB_OPERATION.key}" "Query" "aws.dynamodb.limit" "10" "aws.dynamodb.select" "ALL_ATTRIBUTES" @@ -241,7 +239,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { "aws.requestId" "$requestId" "aws.table.name" "sometable" "${SemanticAttributes.DB_SYSTEM.key}" "dynamodb" - "${SemanticAttributes.DB_NAME.key}" "sometable" "${SemanticAttributes.DB_OPERATION.key}" "${operation}" } }