Package io.opencensus.trace.config
Class TraceParams.Builder
- java.lang.Object
-
- io.opencensus.trace.config.TraceParams.Builder
-
- Direct Known Subclasses:
AutoValue_TraceParams.Builder
- Enclosing class:
- TraceParams
public abstract static class TraceParams.Builder extends java.lang.ObjectABuilderclass forTraceParams.- Since:
- 0.5
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) abstract TraceParamsautoBuild()TraceParamsbuild()Builds and returns aTraceParamswith the desired values.abstract TraceParams.BuildersetMaxNumberOfAnnotations(int maxNumberOfAnnotations)Sets the global default max number ofAnnotationevents perSpan.abstract TraceParams.BuildersetMaxNumberOfAttributes(int maxNumberOfAttributes)Sets the global default max number of attributes perSpan.abstract TraceParams.BuildersetMaxNumberOfLinks(int maxNumberOfLinks)abstract TraceParams.BuildersetMaxNumberOfMessageEvents(int maxNumberOfMessageEvents)Sets the global default max number ofMessageEventevents perSpan.TraceParams.BuildersetMaxNumberOfNetworkEvents(int maxNumberOfNetworkEvents)Deprecated.abstract TraceParams.BuildersetSampler(Sampler sampler)Sets the global defaultSampler.
-
-
-
Method Detail
-
setSampler
public abstract TraceParams.Builder setSampler(Sampler sampler)
- Parameters:
sampler- the global defaultSampler.- Returns:
- this.
- Since:
- 0.5
-
setMaxNumberOfAttributes
public abstract TraceParams.Builder setMaxNumberOfAttributes(int maxNumberOfAttributes)
Sets the global default max number of attributes perSpan.
-
setMaxNumberOfAnnotations
public abstract TraceParams.Builder setMaxNumberOfAnnotations(int maxNumberOfAnnotations)
Sets the global default max number ofAnnotationevents perSpan.- Parameters:
maxNumberOfAnnotations- the global default max number ofAnnotationevents perSpan. It must be positive otherwisebuild()will throw an exception.- Returns:
- this.
- Since:
- 0.5
-
setMaxNumberOfMessageEvents
public abstract TraceParams.Builder setMaxNumberOfMessageEvents(int maxNumberOfMessageEvents)
Sets the global default max number ofMessageEventevents perSpan.- Parameters:
maxNumberOfMessageEvents- the global default max number ofMessageEventevents perSpan. It must be positive otherwisebuild()will throw an exception.- Returns:
- this.
- Since:
- 0.12
-
setMaxNumberOfNetworkEvents
@Deprecated public TraceParams.Builder setMaxNumberOfNetworkEvents(int maxNumberOfNetworkEvents)
Deprecated.Sets the global default max number ofNetworkEventevents perSpan.- Parameters:
maxNumberOfNetworkEvents- the global default max number ofNetworkEventevents perSpan. It must be positive otherwisebuild()will throw an exception.- Returns:
- this.
- Since:
- 0.5
-
setMaxNumberOfLinks
public abstract TraceParams.Builder setMaxNumberOfLinks(int maxNumberOfLinks)
-
autoBuild
abstract TraceParams autoBuild()
-
build
public TraceParams build()
Builds and returns aTraceParamswith the desired values.- Returns:
- a
TraceParamswith the desired values. - Throws:
java.lang.NullPointerException- if the sampler isnull.java.lang.IllegalArgumentException- if any of the max numbers are not positive.- Since:
- 0.5
-
-