Measure SDK can capture network requests, responses and failures along with useful metrics to help understand how APIs are performing in production from an end user perspective. Network monitoring for OkHttp is currently supported, more clients will be added in the future.
Measure can track HTTP request body, response body, response code, response headers, request duration, and more from
OkHttp. Using the Measure Gradle Plugin, this tracking is done automatically for all OkHttpClient
instances in your
app, including the ones in third party libraries.
Measure Gradle Plugin injects
an Application Interceptor
and an Event Listener Factory
into all OkHttpClient
instances used by your application.
This is done using ASM, a bytecode manipulation library, which transforms code at compile time to add the necessary hooks. Read more about automatic instrumentation here.
Measure supports collecting request and response body, this is currently restricted to APIs which have a
header Content-Type: application/json
. This feature is disabled by default and can be enabled
using enableHttpBody config.
Checkout the data collected by Measure for each HTTP request in the HTTP Event section.