onDiagnostic

Registers a listener for SDK diagnostics.