Package 

Interface TracedRequestListener


  • 
    public interface TracedRequestListener
    
                        

    Listener for automatically created DatadogSpan around OkHttp Request.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit onRequestIntercepted(Request request, DatadogSpan span, Response response, Throwable throwable) Notifies that a span was automatically created around an OkHttp Request.
      • Methods inherited from class java.lang.Object

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

      • onRequestIntercepted

         abstract Unit onRequestIntercepted(Request request, DatadogSpan span, Response response, Throwable throwable)

        Notifies that a span was automatically created around an OkHttp Request. You can update the given DatadogSpan (e.g.: add custom tags / baggage items) before it is persisted. Won't be called if Request wasn't sampled.

        Parameters:
        request - the intercepted Request
        span - the DatadogSpan created around the intercepted Request
        response - the Request response in case of any
        throwable - in case an error occurred during the Request