-
public final class DatadogEventListener extends EventListenerDatadog's RUM implementation of OkHttp EventListener.
This will track requests timing information (TTFB, DNS resolution, …) and append it to RUM Resource events.
To use:
OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new DatadogInterceptor()) .eventListenerFactory(new DatadogEventListener.Factory()) .build();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDatadogEventListener.FactoryDatadog's RUM implementation of OkHttp EventListener.Factory. Adding this Factory to your OkHttpClient will allow Datadog to monitor timing information for your requests (DNS resolution, TTFB, …).
The timing information will be appended to the relevant RUM Resource events.
To use:
OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new DatadogInterceptor()) .eventListenerFactory(new DatadogEventListener.Factory()) .build();
-
Method Summary
Modifier and Type Method Description final StringgetKey()UnitcallStart(Call call)UnitdnsStart(Call call, String domainName)UnitdnsEnd(Call call, String domainName, List<InetAddress> inetAddressList)UnitconnectStart(Call call, InetSocketAddress inetSocketAddress, Proxy proxy)UnitconnectEnd(Call call, InetSocketAddress inetSocketAddress, Proxy proxy, Protocol protocol)UnitsecureConnectStart(Call call)UnitsecureConnectEnd(Call call, Handshake handshake)UnitresponseHeadersStart(Call call)UnitresponseHeadersEnd(Call call, Response response)UnitresponseBodyStart(Call call)UnitresponseBodyEnd(Call call, Long byteCount)UnitcallEnd(Call call)UnitcallFailed(Call call, IOException ioe)-
Methods inherited from class com.datadog.android.DatadogEventListener
connectFailed, connectionAcquired, connectionReleased, requestBodyEnd, requestBodyStart, requestHeadersEnd, requestHeadersStart -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
dnsEnd
Unit dnsEnd(Call call, String domainName, List<InetAddress> inetAddressList)
-
connectStart
Unit connectStart(Call call, InetSocketAddress inetSocketAddress, Proxy proxy)
-
connectEnd
Unit connectEnd(Call call, InetSocketAddress inetSocketAddress, Proxy proxy, Protocol protocol)
-
secureConnectStart
Unit secureConnectStart(Call call)
-
secureConnectEnd
Unit secureConnectEnd(Call call, Handshake handshake)
-
responseHeadersStart
Unit responseHeadersStart(Call call)
-
responseHeadersEnd
Unit responseHeadersEnd(Call call, Response response)
-
responseBodyStart
Unit responseBodyStart(Call call)
-
responseBodyEnd
Unit responseBodyEnd(Call call, Long byteCount)
-
callFailed
Unit callFailed(Call call, IOException ioe)
-
-
-
-