Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function flush()
 {
     $flushed = false;
     if ($this->handler) {
         try {
             $flushed = $this->handler->handleBatch($this->metrics);
         } catch (\Exception $e) {
             // @codeCoverageIgnoreStart
             if ($this->logger) {
                 $this->logger->error('An error occurred while flush batch of metrics', ['exception' => $e, 'batch_size' => count($this->metrics)]);
             }
             // @codeCoverageIgnoreEnd
         }
     }
     return $flushed && parent::flush();
 }