I think we need to change `diagnostic_recorder` here to `sample_recorder` (also for line 555).  However, sample_recorder does not have all the parameters necessarily.  We do not have the parameter values from the diagnostics, do we?