addOnSession

open fun addOnSession(@NonNull onSession: OnSessionCallback)

Add an "on session" callback, to execute code before every session captured by Bugsnag.

You can use this to modify sessions before they are stored by Bugsnag. You can also return false from any callback to ignore a session.

For example:

Bugsnag.onSession(new OnSessionCallback() { public boolean run(Session session) { return false; // ignore the session } })

Parameters

onSession

a callback to run before a session is captured

See also