Moved data extraction logic from DiagnosticsConttoller to DiagnosticsService