Gracefully shutdown metrics

This commit is contained in:
Zoltán Papp 2024-08-21 17:06:05 +02:00
parent 86f1724efa
commit 82584f2089

View File

@ -188,7 +188,7 @@ func execute(cmd *cobra.Command, args []string) error {
}
log.Infof("shutting down metrics server")
if err := metricsServer.Close(); err != nil {
if err := metricsServer.Shutdown(ctx); err != nil {
shutDownErrors = multierror.Append(shutDownErrors, fmt.Errorf("failed to close metrics server: %v", err))
}
return shutDownErrors