public static CollectorSampler create(float rate) {
    if (rate < 0 || rate > 1)
      throw new IllegalArgumentException("rate should be between 0 and 1: was " + rate);
    final long boundary = (long) (Long.MAX_VALUE * rate); // safe cast as less <= 1
    return new CollectorSampler() {
      @Override
      protected long boundary() {
        return boundary;
      }
    };
  }
Returns a trace ID sampler with the indicated rate.

@param rate minimum sample rate is 0.0001, or 0.01% of traces
zipkin-collector/core/src/main/java/zipkin2/collector/CollectorSampler.java