[fix bug 1094520] Add sampling to sendMetrics