2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 package org
.apache
.hadoop
.hbase
.trace
;
20 import io
.opentelemetry
.api
.common
.AttributeKey
;
21 import io
.opentelemetry
.semconv
.trace
.attributes
.SemanticAttributes
;
22 import java
.util
.List
;
23 import org
.apache
.yetus
.audience
.InterfaceAudience
;
26 * The constants in this class correspond with the guidance outlined by the OpenTelemetry
27 * <a href="https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/trace/semantic_conventions">Semantic Conventions</a>.
29 @InterfaceAudience.Private
30 public final class HBaseSemanticAttributes
{
31 public static final AttributeKey
<String
> DB_SYSTEM
= SemanticAttributes
.DB_SYSTEM
;
32 public static final String DB_SYSTEM_VALUE
= SemanticAttributes
.DbSystemValues
.HBASE
;
33 public static final AttributeKey
<String
> DB_CONNECTION_STRING
=
34 SemanticAttributes
.DB_CONNECTION_STRING
;
35 public static final AttributeKey
<String
> DB_USER
= SemanticAttributes
.DB_USER
;
36 public static final AttributeKey
<String
> DB_NAME
= SemanticAttributes
.DB_NAME
;
37 public static final AttributeKey
<String
> DB_OPERATION
= SemanticAttributes
.DB_OPERATION
;
38 public static final AttributeKey
<String
> TABLE_KEY
= AttributeKey
.stringKey("db.hbase.table");
40 * For operations that themselves ship one or more operations, such as
41 * {@link Operation#BATCH} and {@link Operation#CHECK_AND_MUTATE}.
43 public static final AttributeKey
<List
<String
>> CONTAINER_DB_OPERATIONS_KEY
=
44 AttributeKey
.stringArrayKey("db.hbase.container_operations");
45 public static final AttributeKey
<List
<String
>> REGION_NAMES_KEY
=
46 AttributeKey
.stringArrayKey("db.hbase.regions");
47 public static final AttributeKey
<String
> RPC_SYSTEM
= SemanticAttributes
.RPC_SYSTEM
;
48 public static final AttributeKey
<String
> RPC_SERVICE
= SemanticAttributes
.RPC_SERVICE
;
49 public static final AttributeKey
<String
> RPC_METHOD
= SemanticAttributes
.RPC_METHOD
;
50 public static final AttributeKey
<String
> SERVER_NAME_KEY
=
51 AttributeKey
.stringKey("db.hbase.server.name");
52 public static final AttributeKey
<String
> NET_PEER_NAME
= SemanticAttributes
.NET_PEER_NAME
;
53 public static final AttributeKey
<Long
> NET_PEER_PORT
= SemanticAttributes
.NET_PEER_PORT
;
54 public static final AttributeKey
<Boolean
> ROW_LOCK_READ_LOCK_KEY
=
55 AttributeKey
.booleanKey("db.hbase.rowlock.readlock");
56 public static final AttributeKey
<String
> WAL_IMPL
= AttributeKey
.stringKey("db.hbase.wal.impl");
59 * These are values used with {@link #DB_OPERATION}. They correspond with the implementations of
60 * {@code org.apache.hadoop.hbase.client.Operation}, as well as
61 * {@code org.apache.hadoop.hbase.client.CheckAndMutate}, and "MULTI", meaning a batch of multiple
64 public enum Operation
{
77 * These are values used with {@link #RPC_SYSTEM}. Only a single value for now; more to come as
78 * we add tracing over our gateway components.
80 public enum RpcSystem
{
84 private HBaseSemanticAttributes() { }