Skip to content

Commit 92c3aed

Browse files
committed
fix build errors
1 parent b2616c4 commit 92c3aed

File tree

87 files changed

+263
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+263
-44
lines changed

instrumentation-annotations-support-testing/src/main/java/io/opentelemetry/javaagent/instrumentation/otelannotations/AbstractWithSpanTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.junit.jupiter.api.Test;
2020
import org.junit.jupiter.api.extension.RegisterExtension;
2121

22+
@SuppressWarnings("deprecation") // CodeIncubatingAttributes.CODE_FUNCTION is deprecated
2223
public abstract class AbstractWithSpanTest<T extends U, U> {
2324

2425
@RegisterExtension

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientCommonAttributesExtractor.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ abstract class DbClientCommonAttributesExtractor<
2424
private static final AttributeKey<String> DB_NAME = AttributeKey.stringKey("db.name");
2525
static final AttributeKey<String> DB_NAMESPACE = AttributeKey.stringKey("db.namespace");
2626
static final AttributeKey<String> DB_SYSTEM = AttributeKey.stringKey("db.system");
27+
public static final AttributeKey<String> DB_SYSTEM_NAME =
28+
AttributeKey.stringKey("db.system.name");
2729
private static final AttributeKey<String> DB_USER = AttributeKey.stringKey("db.user");
2830
private static final AttributeKey<String> DB_CONNECTION_STRING =
2931
AttributeKey.stringKey("db.connection_string");
@@ -37,11 +39,15 @@ abstract class DbClientCommonAttributesExtractor<
3739
@SuppressWarnings("deprecation") // until old db semconv are dropped
3840
@Override
3941
public void onStart(AttributesBuilder attributes, Context parentContext, REQUEST request) {
40-
internalSet(attributes, DB_SYSTEM, getter.getDbSystem(request));
4142
if (SemconvStability.emitStableDatabaseSemconv()) {
43+
internalSet(
44+
attributes,
45+
DB_SYSTEM_NAME,
46+
SemconvStability.stableDbSystemName(getter.getDbSystem(request)));
4247
internalSet(attributes, DB_NAMESPACE, getter.getDbNamespace(request));
4348
}
4449
if (SemconvStability.emitOldDatabaseSemconv()) {
50+
internalSet(attributes, DB_SYSTEM, getter.getDbSystem(request));
4551
internalSet(attributes, DB_USER, getter.getUser(request));
4652
internalSet(attributes, DB_NAME, getter.getDbNamespace(request));
4753
internalSet(attributes, DB_CONNECTION_STRING, getter.getConnectionString(request));

instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/code/CodeAttributesExtractorTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public String getMethodName(Map<String, String> request) {
3737
}
3838
}
3939

40+
@SuppressWarnings("deprecation") // using deprecated semconv
4041
@Test
4142
void shouldExtractAllAttributes() {
4243
// given

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/SemconvStability.java

+27
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
import static java.util.Arrays.asList;
99

10+
import java.util.HashMap;
1011
import java.util.HashSet;
12+
import java.util.Map;
1113
import java.util.Set;
1214

1315
/**
@@ -50,5 +52,30 @@ public static boolean emitStableDatabaseSemconv() {
5052
return emitStableDatabaseSemconv;
5153
}
5254

55+
private static final Map<String, String> dbSystemNameMap = new HashMap<>();
56+
57+
static {
58+
dbSystemNameMap.put("adabas", "softwareag.adabas");
59+
dbSystemNameMap.put("intersystems_cache", "intersystems.cache");
60+
dbSystemNameMap.put("cosmosdb", "azure.cosmosdb");
61+
dbSystemNameMap.put("db2", "ibm.db2");
62+
dbSystemNameMap.put("dynamodb", "aws.dynamodb");
63+
dbSystemNameMap.put("h2", "h2database");
64+
dbSystemNameMap.put("hanadb", "sap.hana");
65+
dbSystemNameMap.put("informix", "ibm.informix");
66+
dbSystemNameMap.put("ingres", "actian.ingres");
67+
dbSystemNameMap.put("maxdb", "sap.maxdb");
68+
dbSystemNameMap.put("mssql", "microsoft.sql_server");
69+
dbSystemNameMap.put("netezza", "ibm.netezza");
70+
dbSystemNameMap.put("oracle", "oracle.db");
71+
dbSystemNameMap.put("redshift", "aws.redshift");
72+
dbSystemNameMap.put("spanner", "gcp.spanner");
73+
}
74+
75+
public static String stableDbSystemName(String oldDbSystem) {
76+
String dbSystemName = dbSystemNameMap.get(oldDbSystem);
77+
return dbSystemName != null ? dbSystemName : oldDbSystem;
78+
}
79+
5380
private SemconvStability() {}
5481
}

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.opentelemetry.context.Context;
1313
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
1414
import io.opentelemetry.instrumentation.api.internal.AttributesExtractorUtil;
15+
import io.opentelemetry.instrumentation.api.internal.SemconvStability;
1516
import java.util.Collections;
1617
import java.util.List;
1718
import javax.annotation.Nullable;
@@ -20,16 +21,24 @@ public class DynamoDbAttributesExtractor implements AttributesExtractor<Request<
2021

2122
// copied from DbIncubatingAttributes
2223
private static final AttributeKey<String> DB_SYSTEM = AttributeKey.stringKey("db.system");
24+
private static final AttributeKey<String> DB_SYSTEM_NAME =
25+
AttributeKey.stringKey("db.system.name");
2326
// copied from AwsIncubatingAttributes
2427
private static final AttributeKey<List<String>> AWS_DYNAMODB_TABLE_NAMES =
2528
AttributeKey.stringArrayKey("aws.dynamodb.table_names");
2629

2730
// copied from DbIncubatingAttributes.DbSystemIncubatingValues
2831
private static final String DYNAMODB = "dynamodb";
32+
// copied from DbIncubatingAttributes.DbSystemNameIncubatingValues
33+
private static final String AWS_DYNAMODB = "aws.dynamodb";
2934

3035
@Override
3136
public void onStart(AttributesBuilder attributes, Context parentContext, Request<?> request) {
32-
AttributesExtractorUtil.internalSet(attributes, DB_SYSTEM, DYNAMODB);
37+
if (SemconvStability.emitStableDatabaseSemconv()) {
38+
AttributesExtractorUtil.internalSet(attributes, DB_SYSTEM_NAME, AWS_DYNAMODB);
39+
} else {
40+
AttributesExtractorUtil.internalSet(attributes, DB_SYSTEM, DYNAMODB);
41+
}
3342
String tableName = RequestAccess.getTableName(request.getOriginalRequest());
3443
AttributesExtractorUtil.internalSet(
3544
attributes, AWS_DYNAMODB_TABLE_NAMES, Collections.singletonList(tableName));

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

+15-3
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77

88
import static io.opentelemetry.api.common.AttributeKey.stringKey;
99
import static io.opentelemetry.instrumentation.testing.junit.db.DbClientMetricsTestUtil.assertDurationMetric;
10+
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
1011
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
1112
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
1213
import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT;
1314
import static io.opentelemetry.semconv.incubating.AwsIncubatingAttributes.AWS_DYNAMODB_TABLE_NAMES;
1415
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM;
15-
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DbSystemIncubatingValues.DYNAMODB;
16+
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DbSystemNameIncubatingValues.AWS_DYNAMODB;
1617
import static java.util.Collections.singletonList;
1718

1819
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
1920
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder;
2021
import com.amazonaws.services.dynamodbv2.model.CreateTableRequest;
22+
import io.opentelemetry.instrumentation.api.internal.SemconvStability;
2123
import io.opentelemetry.sdk.testing.assertj.AttributeAssertion;
24+
import io.opentelemetry.semconv.incubating.DbIncubatingAttributes;
2225
import io.opentelemetry.testing.internal.armeria.common.HttpResponse;
2326
import io.opentelemetry.testing.internal.armeria.common.HttpStatus;
2427
import io.opentelemetry.testing.internal.armeria.common.MediaType;
@@ -35,6 +38,7 @@ protected boolean hasRequestId() {
3538
return false;
3639
}
3740

41+
@SuppressWarnings("deprecation") // using deprecated semconv
3842
@Test
3943
public void sendRequestWithMockedResponse() throws Exception {
4044
AmazonDynamoDBClientBuilder clientBuilder = AmazonDynamoDBClientBuilder.standard();
@@ -49,14 +53,22 @@ public void sendRequestWithMockedResponse() throws Exception {
4953
List<AttributeAssertion> additionalAttributes =
5054
Arrays.asList(
5155
equalTo(stringKey("aws.table.name"), "sometable"),
52-
equalTo(DB_SYSTEM, DYNAMODB),
56+
equalTo(
57+
maybeStable(DB_SYSTEM),
58+
SemconvStability.emitStableDatabaseSemconv()
59+
? AWS_DYNAMODB
60+
: DbIncubatingAttributes.DbSystemIncubatingValues.DYNAMODB),
5361
equalTo(AWS_DYNAMODB_TABLE_NAMES, singletonList("sometable")));
5462

5563
Object response = client.createTable(new CreateTableRequest("sometable", null));
5664
assertRequestWithMockedResponse(
5765
response, client, "DynamoDBv2", "CreateTable", "POST", additionalAttributes);
5866

5967
assertDurationMetric(
60-
testing(), "io.opentelemetry.aws-sdk-1.11", DB_SYSTEM, SERVER_ADDRESS, SERVER_PORT);
68+
testing(),
69+
"io.opentelemetry.aws-sdk-1.11",
70+
maybeStable(DB_SYSTEM),
71+
SERVER_ADDRESS,
72+
SERVER_PORT);
6173
}
6274
}

instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/TracingExecutionInterceptor.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ public final class TracingExecutionInterceptor implements ExecutionInterceptor {
5454
private static final AttributeKey<String> DB_OPERATION_NAME =
5555
AttributeKey.stringKey("db.operation.name");
5656
private static final AttributeKey<String> DB_SYSTEM = AttributeKey.stringKey("db.system");
57+
private static final AttributeKey<String> DB_SYSTEM_NAME =
58+
AttributeKey.stringKey("db.system.name");
5759
// copied from DbIncubatingAttributes.DbSystemIncubatingValues
5860
private static final String DB_SYSTEM_DYNAMODB = "dynamodb";
61+
// copied from DbIncubatingAttributes.DbSystemNameIncubatingValues
62+
private static final String DB_SYSTEM_AWS_DYNAMODB = "aws.dynamodb";
5963
// copied from AwsIncubatingAttributes
6064
private static final AttributeKey<String> AWS_REQUEST_ID =
6165
AttributeKey.stringKey("aws.request_id");
@@ -331,7 +335,12 @@ private void populateRequestAttributes(
331335
fieldMapper.mapToAttributes(sdkRequest, awsSdkRequest, span);
332336

333337
if (awsSdkRequest.type() == DYNAMODB) {
334-
span.setAttribute(DB_SYSTEM, DB_SYSTEM_DYNAMODB);
338+
if (SemconvStability.emitStableDatabaseSemconv()) {
339+
span.setAttribute(DB_SYSTEM, DB_SYSTEM_DYNAMODB);
340+
}
341+
if (SemconvStability.emitOldDatabaseSemconv()) {
342+
span.setAttribute(DB_SYSTEM_NAME, DB_SYSTEM_AWS_DYNAMODB);
343+
}
335344
String operation = attributes.getAttribute(SdkExecutionAttribute.OPERATION_NAME);
336345
if (operation != null) {
337346
if (SemconvStability.emitStableDatabaseSemconv()) {

instrumentation/camel-2.20/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachecamel/decorators/DecoratorRegistry.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class DecoratorRegistry {
1515
private static final SpanDecorator DEFAULT = new BaseSpanDecorator();
1616
private static final Map<String, SpanDecorator> DECORATORS = loadDecorators();
1717

18+
@SuppressWarnings("deprecation") // using deprecated DbSystemIncubatingValues
1819
private static Map<String, SpanDecorator> loadDecorators() {
19-
2020
Map<String, SpanDecorator> result = new HashMap<>();
2121
result.put("ahc", new HttpSpanDecorator());
2222
result.put("ampq", new MessagingSpanDecorator("ampq"));

instrumentation/cassandra/cassandra-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v3_0/CassandraSqlAttributesGetter.java

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
final class CassandraSqlAttributesGetter implements SqlClientAttributesGetter<CassandraRequest> {
1616

17+
@SuppressWarnings("deprecation") // using deprecated DbSystemIncubatingValues
1718
@Override
1819
public String getDbSystem(CassandraRequest request) {
1920
return DbIncubatingAttributes.DbSystemIncubatingValues.CASSANDRA;

instrumentation/cassandra/cassandra-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraAttributesExtractor.java

+55-11
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
import io.opentelemetry.api.common.AttributesBuilder;
1414
import io.opentelemetry.context.Context;
1515
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
16+
import io.opentelemetry.instrumentation.api.internal.SemconvStability;
1617
import io.opentelemetry.semconv.ServerAttributes;
18+
import io.opentelemetry.semconv.incubating.CassandraIncubatingAttributes;
1719
import io.opentelemetry.semconv.incubating.DbIncubatingAttributes;
1820
import java.net.InetSocketAddress;
1921
import java.net.SocketAddress;
@@ -26,6 +28,7 @@ final class CassandraAttributesExtractor
2628
public void onStart(
2729
AttributesBuilder attributes, Context parentContext, CassandraRequest request) {}
2830

31+
@SuppressWarnings("deprecation") // using deprecated semconv
2932
@Override
3033
public void onEnd(
3134
AttributesBuilder attributes,
@@ -46,17 +49,38 @@ public void onEnd(
4649
attributes.put(ServerAttributes.SERVER_PORT, ((InetSocketAddress) address).getPort());
4750
}
4851
if (coordinator.getDatacenter() != null) {
49-
attributes.put(
50-
DbIncubatingAttributes.DB_CASSANDRA_COORDINATOR_DC, coordinator.getDatacenter());
52+
if (SemconvStability.emitStableDatabaseSemconv()) {
53+
attributes.put(
54+
CassandraIncubatingAttributes.CASSANDRA_COORDINATOR_DC, coordinator.getDatacenter());
55+
}
56+
if (SemconvStability.emitOldDatabaseSemconv()) {
57+
attributes.put(
58+
DbIncubatingAttributes.DB_CASSANDRA_COORDINATOR_DC, coordinator.getDatacenter());
59+
}
5160
}
5261
if (coordinator.getHostId() != null) {
53-
attributes.put(
54-
DbIncubatingAttributes.DB_CASSANDRA_COORDINATOR_ID, coordinator.getHostId().toString());
62+
if (SemconvStability.emitStableDatabaseSemconv()) {
63+
attributes.put(
64+
CassandraIncubatingAttributes.CASSANDRA_COORDINATOR_ID,
65+
coordinator.getHostId().toString());
66+
}
67+
if (SemconvStability.emitOldDatabaseSemconv()) {
68+
attributes.put(
69+
DbIncubatingAttributes.DB_CASSANDRA_COORDINATOR_ID,
70+
coordinator.getHostId().toString());
71+
}
5572
}
5673
}
57-
attributes.put(
58-
DbIncubatingAttributes.DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,
59-
executionInfo.getSpeculativeExecutionCount());
74+
if (SemconvStability.emitStableDatabaseSemconv()) {
75+
attributes.put(
76+
CassandraIncubatingAttributes.CASSANDRA_SPECULATIVE_EXECUTION_COUNT,
77+
executionInfo.getSpeculativeExecutionCount());
78+
}
79+
if (SemconvStability.emitOldDatabaseSemconv()) {
80+
attributes.put(
81+
DbIncubatingAttributes.DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,
82+
executionInfo.getSpeculativeExecutionCount());
83+
}
6084

6185
Statement<?> statement = executionInfo.getStatement();
6286
String consistencyLevel;
@@ -67,21 +91,41 @@ public void onEnd(
6791
} else {
6892
consistencyLevel = config.getString(DefaultDriverOption.REQUEST_CONSISTENCY);
6993
}
70-
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_CONSISTENCY_LEVEL, consistencyLevel);
94+
if (SemconvStability.emitStableDatabaseSemconv()) {
95+
attributes.put(CassandraIncubatingAttributes.CASSANDRA_CONSISTENCY_LEVEL, consistencyLevel);
96+
}
97+
if (SemconvStability.emitOldDatabaseSemconv()) {
98+
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_CONSISTENCY_LEVEL, consistencyLevel);
99+
}
71100

72101
if (statement.getPageSize() > 0) {
73-
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_PAGE_SIZE, statement.getPageSize());
102+
if (SemconvStability.emitStableDatabaseSemconv()) {
103+
attributes.put(CassandraIncubatingAttributes.CASSANDRA_PAGE_SIZE, statement.getPageSize());
104+
}
105+
if (SemconvStability.emitOldDatabaseSemconv()) {
106+
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_PAGE_SIZE, statement.getPageSize());
107+
}
74108
} else {
75109
int pageSize = config.getInt(DefaultDriverOption.REQUEST_PAGE_SIZE);
76110
if (pageSize > 0) {
77-
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_PAGE_SIZE, pageSize);
111+
if (SemconvStability.emitStableDatabaseSemconv()) {
112+
attributes.put(CassandraIncubatingAttributes.CASSANDRA_PAGE_SIZE, pageSize);
113+
}
114+
if (SemconvStability.emitOldDatabaseSemconv()) {
115+
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_PAGE_SIZE, pageSize);
116+
}
78117
}
79118
}
80119

81120
Boolean idempotent = statement.isIdempotent();
82121
if (idempotent == null) {
83122
idempotent = config.getBoolean(DefaultDriverOption.REQUEST_DEFAULT_IDEMPOTENCE);
84123
}
85-
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_IDEMPOTENCE, idempotent);
124+
if (SemconvStability.emitStableDatabaseSemconv()) {
125+
attributes.put(CassandraIncubatingAttributes.CASSANDRA_QUERY_IDEMPOTENT, idempotent);
126+
}
127+
if (SemconvStability.emitOldDatabaseSemconv()) {
128+
attributes.put(DbIncubatingAttributes.DB_CASSANDRA_IDEMPOTENCE, idempotent);
129+
}
86130
}
87131
}

instrumentation/cassandra/cassandra-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraSqlAttributesGetter.java

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
final class CassandraSqlAttributesGetter implements SqlClientAttributesGetter<CassandraRequest> {
1717

18+
@SuppressWarnings("deprecation") // using deprecated DbSystemIncubatingValues
1819
@Override
1920
public String getDbSystem(CassandraRequest request) {
2021
return DbIncubatingAttributes.DbSystemIncubatingValues.CASSANDRA;

instrumentation/clickhouse-client-0.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/clickhouse/ClickHouseAttributesGetter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public String getDbOperationName(ClickHouseDbRequest request) {
2929
return request.getSqlStatementInfo().getOperation();
3030
}
3131

32-
@Nullable
32+
@SuppressWarnings("deprecation") // using deprecated DbSystemIncubatingValues
3333
@Override
3434
public String getDbSystem(ClickHouseDbRequest request) {
3535
return DbIncubatingAttributes.DbSystemIncubatingValues.CLICKHOUSE;

instrumentation/couchbase/couchbase-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseAttributesGetter.java

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
final class CouchbaseAttributesGetter implements DbClientAttributesGetter<CouchbaseRequestInfo> {
1313

14+
@SuppressWarnings("deprecation") // using deprecated DbSystemIncubatingValues
1415
@Override
1516
public String getDbSystem(CouchbaseRequestInfo couchbaseRequest) {
1617
return DbIncubatingAttributes.DbSystemIncubatingValues.COUCHBASE;

instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/rest/v5_0/ElasticsearchRest5Test.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package io.opentelemetry.javaagent.instrumentation.elasticsearch.rest.v5_0;
77

8+
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
89
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
910
import static io.opentelemetry.semconv.HttpAttributes.HTTP_REQUEST_METHOD;
1011
import static io.opentelemetry.semconv.HttpAttributes.HTTP_RESPONSE_STATUS_CODE;
@@ -32,6 +33,7 @@
3233
import org.junit.jupiter.api.extension.RegisterExtension;
3334
import org.testcontainers.elasticsearch.ElasticsearchContainer;
3435

36+
@SuppressWarnings("deprecation") // using deprecated semconv
3537
class ElasticsearchRest5Test {
3638

3739
@RegisterExtension
@@ -98,7 +100,7 @@ void elasticsearchStatus() throws IOException {
98100
.hasKind(SpanKind.CLIENT)
99101
.hasNoParent()
100102
.hasAttributesSatisfyingExactly(
101-
equalTo(DB_SYSTEM, "elasticsearch"),
103+
equalTo(maybeStable(DB_SYSTEM), "elasticsearch"),
102104
equalTo(HTTP_REQUEST_METHOD, "GET"),
103105
equalTo(SERVER_ADDRESS, httpHost.getHostName()),
104106
equalTo(SERVER_PORT, httpHost.getPort()),
@@ -174,7 +176,7 @@ public void onFailure(Exception e) {
174176
.hasKind(SpanKind.CLIENT)
175177
.hasParent(trace.getSpan(0))
176178
.hasAttributesSatisfyingExactly(
177-
equalTo(DB_SYSTEM, "elasticsearch"),
179+
equalTo(maybeStable(DB_SYSTEM), "elasticsearch"),
178180
equalTo(HTTP_REQUEST_METHOD, "GET"),
179181
equalTo(SERVER_ADDRESS, httpHost.getHostName()),
180182
equalTo(SERVER_PORT, httpHost.getPort()),

0 commit comments

Comments
 (0)