use of io.opentelemetry.api.common.AttributeKey in project hbase by apache.
the class IpcClientSpanBuilder method build.
@SuppressWarnings("unchecked")
public Span build() {
final SpanBuilder builder = TraceUtil.getGlobalTracer().spanBuilder(name).setSpanKind(SpanKind.CLIENT);
attributes.forEach((k, v) -> builder.setAttribute((AttributeKey<? super Object>) k, v));
return builder.startSpan();
}
use of io.opentelemetry.api.common.AttributeKey in project hbase by apache.
the class TableSpanBuilder method build.
@SuppressWarnings("unchecked")
public Span build() {
final SpanBuilder builder = TraceUtil.getGlobalTracer().spanBuilder(name).setSpanKind(SpanKind.CLIENT);
attributes.forEach((k, v) -> builder.setAttribute((AttributeKey<? super Object>) k, v));
return builder.startSpan();
}
use of io.opentelemetry.api.common.AttributeKey in project hbase by apache.
the class ConnectionSpanBuilder method build.
@SuppressWarnings("unchecked")
public Span build() {
final SpanBuilder builder = TraceUtil.getGlobalTracer().spanBuilder(name).setSpanKind(SpanKind.CLIENT);
attributes.forEach((k, v) -> builder.setAttribute((AttributeKey<? super Object>) k, v));
return builder.startSpan();
}
use of io.opentelemetry.api.common.AttributeKey in project hbase by apache.
the class TableOperationSpanBuilder method build.
@SuppressWarnings("unchecked")
public Span build() {
final String name = attributes.getOrDefault(DB_OPERATION, unknown) + " " + (tableName != null ? tableName.getNameWithNamespaceInclAsString() : unknown);
final SpanBuilder builder = TraceUtil.getGlobalTracer().spanBuilder(name).setSpanKind(SpanKind.CLIENT);
attributes.forEach((k, v) -> builder.setAttribute((AttributeKey<? super Object>) k, v));
return builder.startSpan();
}
use of io.opentelemetry.api.common.AttributeKey in project hbase by apache.
the class IpcServerSpanBuilder method build.
@SuppressWarnings("unchecked")
public Span build() {
final SpanBuilder builder = TraceUtil.getGlobalTracer().spanBuilder(name).setSpanKind(SpanKind.SERVER);
attributes.forEach((k, v) -> builder.setAttribute((AttributeKey<? super Object>) k, v));
return builder.setParent(Context.current().with(((ServerCall<?>) rpcCall).getSpan())).startSpan();
}
Aggregations