Package io.opencensus.trace.config
Class TraceParams
- java.lang.Object
-
- io.opencensus.trace.config.TraceParams
-
- Direct Known Subclasses:
AutoValue_TraceParams
@Immutable public abstract class TraceParams extends java.lang.Object
Class that holds global trace parameters.- Since:
- 0.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TraceParams.Builder
ABuilder
class forTraceParams
.
-
Field Summary
Fields Modifier and Type Field Description static TraceParams
DEFAULT
DefaultTraceParams
.private static double
DEFAULT_PROBABILITY
private static Sampler
DEFAULT_SAMPLER
private static int
DEFAULT_SPAN_MAX_NUM_ANNOTATIONS
private static int
DEFAULT_SPAN_MAX_NUM_ATTRIBUTES
private static int
DEFAULT_SPAN_MAX_NUM_LINKS
private static int
DEFAULT_SPAN_MAX_NUM_MESSAGE_EVENTS
-
Constructor Summary
Constructors Constructor Description TraceParams()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static TraceParams.Builder
builder()
abstract int
getMaxNumberOfAnnotations()
Returns the global default max number ofAnnotation
events perSpan
.abstract int
getMaxNumberOfAttributes()
Returns the global default max number of attributes perSpan
.abstract int
getMaxNumberOfLinks()
abstract int
getMaxNumberOfMessageEvents()
Returns the global default max number ofMessageEvent
events perSpan
.int
getMaxNumberOfNetworkEvents()
Deprecated.abstract Sampler
getSampler()
Returns the global defaultSampler
.abstract TraceParams.Builder
toBuilder()
Returns aTraceParams.Builder
initialized to the same property values as the current instance.
-
-
-
Field Detail
-
DEFAULT_PROBABILITY
private static final double DEFAULT_PROBABILITY
- See Also:
- Constant Field Values
-
DEFAULT_SAMPLER
private static final Sampler DEFAULT_SAMPLER
-
DEFAULT_SPAN_MAX_NUM_ATTRIBUTES
private static final int DEFAULT_SPAN_MAX_NUM_ATTRIBUTES
- See Also:
- Constant Field Values
-
DEFAULT_SPAN_MAX_NUM_ANNOTATIONS
private static final int DEFAULT_SPAN_MAX_NUM_ANNOTATIONS
- See Also:
- Constant Field Values
-
DEFAULT_SPAN_MAX_NUM_MESSAGE_EVENTS
private static final int DEFAULT_SPAN_MAX_NUM_MESSAGE_EVENTS
- See Also:
- Constant Field Values
-
DEFAULT_SPAN_MAX_NUM_LINKS
private static final int DEFAULT_SPAN_MAX_NUM_LINKS
- See Also:
- Constant Field Values
-
DEFAULT
public static final TraceParams DEFAULT
DefaultTraceParams
.- Since:
- 0.5
-
-
Method Detail
-
getSampler
public abstract Sampler getSampler()
Returns the global defaultSampler
. Used if noSampler
is provided inSpanBuilder.setSampler(Sampler)
.- Returns:
- the global default
Sampler
. - Since:
- 0.5
-
getMaxNumberOfAttributes
public abstract int getMaxNumberOfAttributes()
Returns the global default max number of attributes perSpan
.- Returns:
- the global default max number of attributes per
Span
. - Since:
- 0.5
-
getMaxNumberOfAnnotations
public abstract int getMaxNumberOfAnnotations()
Returns the global default max number ofAnnotation
events perSpan
.- Returns:
- the global default max number of
Annotation
events perSpan
. - Since:
- 0.5
-
getMaxNumberOfMessageEvents
public abstract int getMaxNumberOfMessageEvents()
Returns the global default max number ofMessageEvent
events perSpan
.- Returns:
- the global default max number of
MessageEvent
events perSpan
. - Since:
- 0.12
-
getMaxNumberOfNetworkEvents
@Deprecated public int getMaxNumberOfNetworkEvents()
Deprecated.Returns the global default max number ofNetworkEvent
events perSpan
.- Returns:
- the global default max number of
NetworkEvent
events perSpan
. - Since:
- 0.5
-
getMaxNumberOfLinks
public abstract int getMaxNumberOfLinks()
- Returns:
- the global default max number of
Link
entries perSpan
. - Since:
- 0.5
-
builder
private static TraceParams.Builder builder()
-
toBuilder
public abstract TraceParams.Builder toBuilder()
Returns aTraceParams.Builder
initialized to the same property values as the current instance.- Returns:
- a
TraceParams.Builder
initialized to the same property values as the current instance. - Since:
- 0.5
-
-