cherry-pick 'Fixed dashboards init call on all documentation samples' from 5-trunk branch