HBASE-25617 Revisit the span names (#2998)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
This commit is contained in:
Duo Zhang 2021-03-01 09:47:00 +08:00 committed by Duo Zhang
parent f6ff519dd0
commit 8d68f8cd1c
3 changed files with 4 additions and 4 deletions

View File

@ -424,12 +424,12 @@ class AsyncConnectionImpl implements AsyncConnection {
}
});
return future;
}, getClass().getName() + ".getHbck");
}, "AsyncConnection.getHbck");
}
@Override
public Hbck getHbck(ServerName masterServer) throws IOException {
Span span = TraceUtil.createSpan(getClass().getName() + ".getHbck")
Span span = TraceUtil.createSpan("AsyncConnection.getHbck")
.setAttribute(TraceUtil.SERVER_NAME_KEY, masterServer.getServerName());
try (Scope scope = span.makeCurrent()) {
// we will not create a new connection when creating a new protobuf stub, and for hbck there

View File

@ -98,7 +98,7 @@ class AsyncRegionLocator {
private <T> CompletableFuture<T> tracedLocationFuture(Supplier<CompletableFuture<T>> action,
Function<T, List<String>> getRegionNames, TableName tableName, String methodName) {
Span span = createTableSpan(getClass().getSimpleName() + "." + methodName, tableName);
Span span = createTableSpan("AsyncRegionLocator." + methodName, tableName);
try (Scope scope = span.makeCurrent()) {
CompletableFuture<T> future = action.get();
FutureUtils.addListener(future, (resp, error) -> {

View File

@ -305,6 +305,6 @@ public class ConnectionFactory {
}
});
return future;
}, ConnectionFactory.class.getSimpleName() + ".createAsyncConnection");
}, "ConnectionFactory.createAsyncConnection");
}
}