Class ParentBasedSamplerBuilder


  • public final class ParentBasedSamplerBuilder
    extends Object
    A builder for creating ParentBased sampler instances.
    • Method Detail

      • setRemoteParentSampled

        public ParentBasedSamplerBuilder setRemoteParentSampled​(Sampler remoteParentSampled)
        Sets the Sampler 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

        public ParentBasedSamplerBuilder setRemoteParentNotSampled​(Sampler remoteParentNotSampled)
        Sets the Sampler 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

        public ParentBasedSamplerBuilder setLocalParentSampled​(Sampler localParentSampled)
        Sets the Sampler 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

        public ParentBasedSamplerBuilder setLocalParentNotSampled​(Sampler localParentNotSampled)
        Sets the Sampler 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

        public Sampler build()
        Builds the ParentBasedSampler.
        Returns:
        the ParentBased sampler.