class RateLimitingSampler extends Sampler {

  public static Sampler create(int tracesPerSecond) {
    if (tracesPerSecond < 0) throw new IllegalArgumentException("tracesPerSecond < 0");
    if (tracesPerSecond == 0) return Sampler.NEVER_SAMPLE;
    return new RateLimitingSampler(tracesPerSecond);
  }

    RateLimitingSampler(int tracesPerSecond);

}