update Kissmetrics thread safe code