Module brave.http
Package brave.http

Class HttpTracing


  • public class HttpTracing
    extends java.lang.Object
    • Method Detail

      • tracing

        public Tracing tracing()
      • clientOf

        public HttpTracing clientOf​(java.lang.String serverName)
        Scopes this component for a client of the indicated server.
        See Also:
        serverName()
      • clientSampler

        public HttpSampler clientSampler()
        Returns an overriding sampling decision for a new trace. Defaults to ignore the request and use the trace ID instead.

        This decision happens when a trace was not yet started in process. For example, you may be making an http request as a part of booting your application. You may want to opt-out of tracing client requests that did not originate from a server request.

      • serverSampler

        public HttpSampler serverSampler()
        Returns an overriding sampling decision for a new trace. Defaults to ignore the request and use the trace ID instead.

        This decision happens when trace IDs were not in headers, or a sampling decision has not yet been made. For example, if a trace is already in progress, this function is not called. You can implement this to skip paths that you never want to trace.