Package 

Interface NetworkTracedRequestListener


  • 
    public interface NetworkTracedRequestListener
    
                        

    Listener for automatically created com.datadog.android.trace.api.span.DatadogSpan around com.datadog.android.api.instrumentation.network.HttpRequestInfo.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit onRequestIntercepted(HttpRequestInfo request, DatadogSpan span, HttpResponseInfo response, Throwable throwable) Notifies that a span was automatically created around an OkHttp com.datadog.android.api.instrumentation.network.HttpRequestInfo.
      • Methods inherited from class java.lang.Object

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

      • onRequestIntercepted

         abstract Unit onRequestIntercepted(HttpRequestInfo request, DatadogSpan span, HttpResponseInfo response, Throwable throwable)

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

        Parameters:
        request - the intercepted com.datadog.android.api.instrumentation.network.HttpRequestInfo
        span - the com.datadog.android.trace.api.span.DatadogSpan created around the intercepted com.datadog.android.api.instrumentation.network.HttpRequestInfo
        response - the com.datadog.android.api.instrumentation.network.HttpRequestInfo response in case of any
        throwable - in case an error occurred during the com.datadog.android.api.instrumentation.network.HttpRequestInfo