   [session]
   (alia/prepare session insert-cql))
 
+(defn- log-error
+  "Log a error."
+  [e tenant rollup period path time]
+  (wlog/error (str "Metric store error: " e ", "
+                   "tenant: " tenant ", "
+                   "rollup " rollup ", "
+                   "period: " period ", "
+                   "path: " path ", "
+                   "time: " time)))
+
 (defn- get-channel
   "Get store channel."
   [session statement chan-size data-stored?]

    (utils/go-while (not @data-stored?)
                    (let [values (async/<! ch)]
                      (if values
                        (try
                          (async/take!
                           (alia/execute-chan session statement
                                              {:values values :consistency :any})
                           (fn [rows-or-e]
                             (if (instance? Throwable rows-or-e)
                               (wlog/error "Metric store error: " rows-or-e))))
                          (catch Exception e
                            (wlog/error "Metric store error: " e)))
                        (when (not @data-stored?)
                          (swap! data-stored? (fn [_] true))))))
    ch))

                              (int rollup) (int period) (str path)
                              (long time)])
          (catch Exception e
            (log-error e tenant rollup period path time))))
      (fetch-series [this tenant rollup period path from to]
        (try
          (let [series (atom {})]
