Skip to content
TraceItX Docs
Documentation

Console & network

The last few seconds of log and network activity, captured automatically once wired.

Updated

Log capture starts with start(). Network capture starts when you attach the interceptor to your own OkHttpClient:

import com.traceitx.okhttp.addTraceItXInterceptor

val client = OkHttpClient.Builder()
    .addTraceItXInterceptor()
    .build()

The SDK never installs a global interceptor or touches a client it does not own — add it to every client whose traffic you want in reports. Order in the chain is yours; it is an application interceptor and does not alter the response.

Both are rolling buffers — you get the entries leading up to the report, not the whole session.

What is captured

ConsoleEverything logged through Timber, at the usual levels, plus lines written to System.out and System.err.
NetworkRequests through the interceptor, as metadata: method, redacted URL, status, duration, allowlisted headers.

Plain android.util.Log calls are not captured. The SDK does not read Logcat; it plants a Timber Tree when Timber is on the classpath and tees the standard streams. Route your logging through Timber if you want it in reports. Other apps’ output is never captured.

Network capture is OkHttp onlyHttpURLConnection and other stacks are invisible. Retrofit and Ktor on the OkHttp engine work through the client you give them.

Each stream has its own fixed-size buffer. capture.ringBufferCapacity exists in the config but is not read by the SDK today; setting it changes nothing. Console entries are also trimmed against the shared breadcrumb byte budget, so a chatty app sheds old entries rather than inflating the report.

Bodies are separate and off by default. capture.network gates body capture, not request metadata — see Network bodies.

How they reach the envelope

Both land as breadcrumbs, with kind: "console" and kind: "network", on the shared clock. The envelope also carries payload.logs and payload.network arrays, but those are deprecated and kept only so older receivers keep working.

Read payload.breadcrumbs and filter by kind. It is the only way to see logs and network interleaved with screens and taps on one timeline.

Redaction

Both streams pass through the redaction engine before they are buffered, not before they are sent. URLs and headers are redacted in the interceptor; log lines as they enter the breadcrumb buffer. A token in a query string never reaches the buffer, so it cannot be recovered from a report even by us.