Package brave.http

Class HttpRuleSampler.Builder

  • Enclosing class:
    HttpRuleSampler

    public static final class HttpRuleSampler.Builder
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      HttpRuleSampler.Builder addRule​(java.lang.String method, java.lang.String path, float rate)
      Assigns a sample rate to all requests that match the input.
      HttpSampler build()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addRule

        public HttpRuleSampler.Builder addRule​(@Nullable
                                               java.lang.String method,
                                               java.lang.String path,
                                               float rate)
        Assigns a sample rate to all requests that match the input.
        Parameters:
        method - if null, any method is accepted
        path - all paths starting with this string are accepted
        rate - percentage of requests to start traces for. 1.0 is 100%