Class ParentBasedSamplerBuilder
java.lang.Object
io.opentelemetry.sdk.trace.samplers.ParentBasedSamplerBuilder
A builder for creating ParentBased sampler instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theParentBasedSampler
.setLocalParentNotSampled
(Sampler localParentNotSampled) Sets theSampler
to use when there is a local parent that was not sampled.setLocalParentSampled
(Sampler localParentSampled) Sets theSampler
to use when there is a local parent that was sampled.setRemoteParentNotSampled
(Sampler remoteParentNotSampled) Sets theSampler
to use when there is a remote parent that was not sampled.setRemoteParentSampled
(Sampler remoteParentSampled) Sets theSampler
to use when there is a remote parent that was sampled.
-
Method Details
-
setRemoteParentSampled
Sets theSampler
to use when there is a remote parent that was sampled. If not set, defaults to always sampling if the remote parent was sampled.- Returns:
- this Builder
-
setRemoteParentNotSampled
Sets theSampler
to use when there is a remote parent that was not sampled. If not set, defaults to never sampling when the remote parent isn't sampled.- Returns:
- this Builder
-
setLocalParentSampled
Sets theSampler
to use when there is a local parent that was sampled. If not set, defaults to always sampling if the local parent was sampled.- Returns:
- this Builder
-
setLocalParentNotSampled
Sets theSampler
to use when there is a local parent that was not sampled. If not set, defaults to never sampling when the local parent isn't sampled.- Returns:
- this Builder
-
build
Builds theParentBasedSampler
.- Returns:
- the ParentBased sampler.
-