Package com.couchbase.client.core.cnc
Class CbTracing
- java.lang.Object
-
- com.couchbase.client.core.cnc.CbTracing
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getTracingId(ServiceType serviceType)
static boolean
isInternalSpan(RequestSpan span)
Returns true if the span is an internal one (noop or threshold) so that particular optimizations can be applied.static boolean
isInternalTracer(RequestTracer tracer)
Returns true if the tracer is an internal one (noop or threshold) so that particular optimizations can be applied.static RequestSpan
newSpan(RequestTracer tracer, String spanName, RequestSpan parent)
Returns a new span with the `db.system` attribute set to `couchbase`.static RequestSpan
newSpan(CoreContext coreContext, String spanName, RequestSpan parent)
Returns a new span with the `db.system` attribute set to `couchbase`.static void
setAttributes(RequestSpan span, Map<String,?> attributes)
-
-
-
Method Detail
-
isInternalTracer
public static boolean isInternalTracer(RequestTracer tracer)
Returns true if the tracer is an internal one (noop or threshold) so that particular optimizations can be applied.- Parameters:
tracer
- the tracer to check.- Returns:
- true if internal, false otherwise.
-
isInternalSpan
public static boolean isInternalSpan(RequestSpan span)
Returns true if the span is an internal one (noop or threshold) so that particular optimizations can be applied.- Parameters:
span
- the span to check.- Returns:
- true if internal, false otherwise.
-
newSpan
public static RequestSpan newSpan(CoreContext coreContext, String spanName, RequestSpan parent)
Returns a new span with the `db.system` attribute set to `couchbase`.- Parameters:
parent
- (nullable)
-
newSpan
public static RequestSpan newSpan(RequestTracer tracer, String spanName, RequestSpan parent)
Returns a new span with the `db.system` attribute set to `couchbase`.- Parameters:
parent
- (nullable)
-
setAttributes
public static void setAttributes(RequestSpan span, Map<String,?> attributes)
- Parameters:
span
- (nullable)attributes
- (nullable)
-
getTracingId
public static String getTracingId(ServiceType serviceType)
-
-