Class TracingUtils
- java.lang.Object
-
- com.couchbase.client.core.io.netty.TracingUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
setCommonDispatchSpanAttributes(RequestSpan span, String localId, String localHost, int localPort, String remoteHost, int remotePort, String operationId)
Sets common dispatch span attributes as per spec.static void
setCommonKVSpanAttributes(RequestSpan span, KeyValueRequest<Response> request)
Sets attributes that are usefully duplicated across multiple spans.static void
setNumericOperationId(RequestSpan span, long operationId)
Sets the operation ID as a numeric value.static void
setServerDurationAttribute(RequestSpan span, long serverDuration)
Sets the server duration attribute, if larger than 0 (will ignore it otherwise).
-
-
-
Method Detail
-
setCommonDispatchSpanAttributes
public static void setCommonDispatchSpanAttributes(RequestSpan span, @Nullable String localId, @Nullable String localHost, int localPort, @Nullable String remoteHost, int remotePort, @Nullable String operationId)
Sets common dispatch span attributes as per spec.- Parameters:
span
- the affected span.localId
- the local socket ID.localHost
- the local hostname or ip.localPort
- the local port.remoteHost
- the remote hostname or ip.remotePort
- the remote port.operationId
- the unique operation ID - can be null (then ignored).
-
setCommonKVSpanAttributes
public static void setCommonKVSpanAttributes(RequestSpan span, KeyValueRequest<Response> request)
Sets attributes that are usefully duplicated across multiple spans.
-
setNumericOperationId
public static void setNumericOperationId(RequestSpan span, long operationId)
Sets the operation ID as a numeric value.- Parameters:
span
- the span where it should be set.operationId
- the numeric operation id.
-
setServerDurationAttribute
public static void setServerDurationAttribute(RequestSpan span, long serverDuration)
Sets the server duration attribute, if larger than 0 (will ignore it otherwise).- Parameters:
span
- the span where it should be set.serverDuration
- the actual duration.
-
-