Skip to content

Commit 4dc40fb

Browse files
committed
HBASE-26520 Remove use of db.hbase.namespance tracing attribute
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
1 parent 674cdc0 commit 4dc40fb

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/trace/TableSpanBuilder.java

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.apache.hadoop.hbase.client.trace;
2020

2121
import static org.apache.hadoop.hbase.trace.HBaseSemanticAttributes.DB_NAME;
22-
import static org.apache.hadoop.hbase.trace.HBaseSemanticAttributes.NAMESPACE_KEY;
2322
import static org.apache.hadoop.hbase.trace.HBaseSemanticAttributes.TABLE_KEY;
2423
import io.opentelemetry.api.common.AttributeKey;
2524
import io.opentelemetry.api.trace.Span;
@@ -81,7 +80,6 @@ static void populateTableNameAttributes(
8180
final Map<AttributeKey<?>, Object> attributes,
8281
final TableName tableName
8382
) {
84-
attributes.put(NAMESPACE_KEY, tableName.getNamespaceAsString());
8583
attributes.put(DB_NAME, tableName.getNamespaceAsString());
8684
attributes.put(TABLE_KEY, tableName.getNameAsString());
8785
}

hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/hamcrest/TraceTestUtil.java

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public static Matcher<SpanData> buildConnectionAttributesMatcher(AsyncConnection
4747
public static Matcher<SpanData> buildTableAttributesMatcher(TableName tableName) {
4848
return hasAttributes(allOf(
4949
containsEntry("db.name", tableName.getNamespaceAsString()),
50-
containsEntry("db.hbase.namespace", tableName.getNamespaceAsString()),
5150
containsEntry("db.hbase.table", tableName.getNameAsString())));
5251
}
5352
}

hbase-common/src/main/java/org/apache/hadoop/hbase/trace/HBaseSemanticAttributes.java

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public final class HBaseSemanticAttributes {
3434
SemanticAttributes.DB_CONNECTION_STRING;
3535
public static final AttributeKey<String> DB_USER = SemanticAttributes.DB_USER;
3636
public static final AttributeKey<String> DB_NAME = SemanticAttributes.DB_NAME;
37-
public static final AttributeKey<String> NAMESPACE_KEY = SemanticAttributes.DB_HBASE_NAMESPACE;
3837
public static final AttributeKey<String> DB_OPERATION = SemanticAttributes.DB_OPERATION;
3938
public static final AttributeKey<String> TABLE_KEY = AttributeKey.stringKey("db.hbase.table");
4039
/**

0 commit comments

Comments
 (0)