- java.lang.Object
-
- brave.internal.InternalPropagation
-
public abstract class InternalPropagation extends java.lang.ObjectEscalate internal APIs inbrave.propagationso they can be used from outside packages. The only implementation is inSamplingFlags.Inspired by
okhttp3.internal.Internal.
-
-
Field Summary
Fields Modifier and Type Field Description static intFLAG_DEBUGstatic intFLAG_LOCAL_ROOTstatic intFLAG_SAMPLEDA flags bitfield is used internally insideTraceContextas opposed to several booleans.static intFLAG_SAMPLED_LOCALstatic intFLAG_SAMPLED_SETstatic intFLAG_SHAREDstatic InternalPropagationinstance
-
Constructor Summary
Constructors Constructor Description InternalPropagation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intflags(SamplingFlags flags)abstract TraceContextnewTraceContext(int flags, long traceIdHigh, long traceId, long localRootId, long parentId, long spanId, java.util.List<java.lang.Object> extra)static intsampled(boolean sampled, int flags)abstract TraceContextwithExtra(TraceContext context, java.util.List<java.lang.Object> immutableExtra)TraceContext is immutable so you need to read the resultabstract TraceContextwithFlags(TraceContext context, int flags)TraceContext is immutable so you need to read the result
-
-
-
Field Detail
-
FLAG_SAMPLED
public static final int FLAG_SAMPLED
A flags bitfield is used internally insideTraceContextas opposed to several booleans. This reduces the size of the object and allows us to set or check a couple states at once.- See Also:
- Constant Field Values
-
FLAG_SAMPLED_SET
public static final int FLAG_SAMPLED_SET
- See Also:
- Constant Field Values
-
FLAG_DEBUG
public static final int FLAG_DEBUG
- See Also:
- Constant Field Values
-
FLAG_SHARED
public static final int FLAG_SHARED
- See Also:
- Constant Field Values
-
FLAG_SAMPLED_LOCAL
public static final int FLAG_SAMPLED_LOCAL
- See Also:
- Constant Field Values
-
FLAG_LOCAL_ROOT
public static final int FLAG_LOCAL_ROOT
- See Also:
- Constant Field Values
-
instance
public static InternalPropagation instance
-
-
Method Detail
-
flags
public abstract int flags(SamplingFlags flags)
-
sampled
public static int sampled(boolean sampled, int flags)
-
newTraceContext
public abstract TraceContext newTraceContext(int flags, long traceIdHigh, long traceId, long localRootId, long parentId, long spanId, java.util.List<java.lang.Object> extra)
- Parameters:
localRootId- must be non-zero prior to instantiatingSpanorScopedSpan
-
withExtra
public abstract TraceContext withExtra(TraceContext context, java.util.List<java.lang.Object> immutableExtra)
TraceContext is immutable so you need to read the result
-
withFlags
public abstract TraceContext withFlags(TraceContext context, int flags)
TraceContext is immutable so you need to read the result
-
-