feat(GODT-2556): Add functional test for Heartbeat Init and telemetry availability.

This commit is contained in:
Romain LE JEUNE
2023-04-21 10:06:01 +02:00
committed by Romain Le Jeune
parent 4adc6d60b9
commit d3fc9a50f6
8 changed files with 150 additions and 21 deletions

View File

@ -157,7 +157,13 @@ func (heartbeat *Heartbeat) TrySending() {
heartbeat.log.WithFields(logrus.Fields{
"metrics": heartbeat.metrics,
}).Error("Failed to send heartbeat")
} else if err := heartbeat.manager.SetLastHeartbeatSent(now); err != nil {
return
}
heartbeat.log.WithFields(logrus.Fields{
"metrics": heartbeat.metrics,
}).Debug("Heartbeat sent")
if err := heartbeat.manager.SetLastHeartbeatSent(now); err != nil {
heartbeat.log.WithError(err).Warn("Cannot save last heartbeat sent to the vault.")
}
}