public Observable < DiagnosticsResponse > diagnostics ( final String id ) { List < Observable < EndpointHealth >> diags = new ArrayList < Observable < EndpointHealth > > ( nodes . size ( ) ) ; for ( Node node : nodes ) { diags . add ( node . diagnostics ( ) ) ; } final RingBufferDiagnostics ringBufferDiagnostics = RingBufferMonitor . instance ( ) . diagnostics ( ) ; return Observable . merge ( diags ) . toList ( ) . map ( new Func1 < List < EndpointHealth > , DiagnosticsResponse > ( ) { @ Override public DiagnosticsResponse call ( List < EndpointHealth > checks ) { return new DiagnosticsResponse ( new DiagnosticsReport ( checks , environment . userAgent ( ) , id , ringBufferDiagnostics ) ) ; } } ) ; }
Performs the logistics of collecting and assembling the individual health check information on a per - service basis .