public abstract static class TraceParams.Builder extends Object
Builder
class for TraceParams
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TraceParams |
build()
Builds and returns a
TraceParams with the desired values. |
abstract TraceParams.Builder |
setMaxNumberOfAnnotations(int maxNumberOfAnnotations)
Sets the global default max number of
Annotation events per Span . |
abstract TraceParams.Builder |
setMaxNumberOfAttributes(int maxNumberOfAttributes)
Sets the global default max number of attributes per
Span . |
abstract TraceParams.Builder |
setMaxNumberOfLinks(int maxNumberOfLinks)
|
abstract TraceParams.Builder |
setMaxNumberOfNetworkEvents(int maxNumberOfNetworkEvents)
Sets the global default max number of
NetworkEvent events per Span . |
abstract TraceParams.Builder |
setSampler(Sampler sampler)
Sets the global default
Sampler . |
public abstract TraceParams.Builder setSampler(Sampler sampler)
sampler
- the global default Sampler
.public abstract TraceParams.Builder setMaxNumberOfAttributes(int maxNumberOfAttributes)
Span
.public abstract TraceParams.Builder setMaxNumberOfAnnotations(int maxNumberOfAnnotations)
Annotation
events per Span
.maxNumberOfAnnotations
- the global default max number of Annotation
events per
Span
. It must be positive otherwise build()
will throw an exception.public abstract TraceParams.Builder setMaxNumberOfNetworkEvents(int maxNumberOfNetworkEvents)
NetworkEvent
events per Span
.maxNumberOfNetworkEvents
- the global default max number of NetworkEvent
events
per Span
. It must be positive otherwise build()
will throw an exception.public abstract TraceParams.Builder setMaxNumberOfLinks(int maxNumberOfLinks)
public TraceParams build()
TraceParams
with the desired values.TraceParams
with the desired values.NullPointerException
- if the sampler is null
.IllegalArgumentException
- if any of the max numbers are not positive.