Skip to content

Commit b711a85

Browse files
authored
Update Prometheus.php
1 parent 9512681 commit b711a85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Log/Prometheus.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function onBackupEnd(Event\Backup\End $event)
7676
{
7777
$this->backupStats[$event->getConfiguration()->getName()]['timeEnd'] = microtime(true);
7878
$this->backupStats[$event->getConfiguration()->getName()]['lastRun'] = microtime(true);
79-
$this->backupStats[$event->getConfiguration()->getName()]['size'] = empty(trim($event->getTarget()->getSize())) ? "0" : $event->getTarget()->getSize();
79+
$this->backupStats[$event->getConfiguration()->getName()]['size'] = $event->getTarget()->getSize();
8080
}
8181

8282
/**
@@ -124,7 +124,7 @@ public function onPhpbuEnd(End $event)
124124
foreach ($this->backupStats as $backupName => $backupStats) {
125125
$this->write(
126126
'phpbu_backup_size{name="' . $backupName . '"} ' .
127-
$this->backupStats[$backupName]['size'] .
127+
$this->backupStats[$backupName]['size'] ?? "0" .
128128
PHP_EOL
129129
);
130130
}

0 commit comments

Comments
 (0)