install Porthole
Instruments an OkHttp client.
OkHttpClient.Builder().installPorthole().build()Top level, and named the same as the Room one on purpose: they are extensions on different receivers, so one import covers both and a file that builds a client and a database reads the same way twice. As members of two objects they collided, and needed an as rename to use together.
Parameters
an event listener factory of your own to keep. The porthole forwards to it rather than replacing it.
request and response body capture. Off by default: phases, timings, status codes and headers come through either way.
Instruments a Room database.
Room.databaseBuilder(context, AppDb::class.java, "app.db").installPorthole().build()Room is not what is being instrumented — SupportSQLiteOpenHelper is, and Room is one of the things that opens a database through it. See portholeSqliteFactory for everything else built on the same layer.
Parameters
record the values bound to ? placeholders. On by default, because a write with its values stripped tells you almost nothing.
per-value truncation. Blobs are never included, only sized.