Implementing application diagnostics