File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,6 @@ function main() {
377377 process . env . REPORT_TOKEN = _config . reportToken ;
378378 const server = new S3Server ( _config ) ;
379379 server . initiateStartup ( logger . newRequestLogger ( ) ) ;
380- monitoringClient . collectDefaultMetrics ( { timeout : 5000 } ) ;
381380 }
382381 if ( _config . isCluster && cluster . isPrimary ) {
383382 for ( let n = 0 ; n < workers ; n ++ ) {
@@ -428,6 +427,10 @@ function main() {
428427 if ( _config . isCluster && cluster . isWorker ) {
429428 const server = new S3Server ( _config , cluster . worker ) ;
430429 server . initiateStartup ( logger . newRequestLogger ( ) ) ;
430+ }
431+
432+ // Avoid default metrics on cluster primary as it only aggregate workers
433+ if ( ! _config . isCluster || cluster . isWorker ) {
431434 monitoringClient . collectDefaultMetrics ( { timeout : 5000 } ) ;
432435 }
433436}
You can’t perform that action at this time.
0 commit comments