Skip to content

Commit

Permalink
wiiiiiiipppp
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed May 10, 2024
1 parent 02df309 commit c1bf83b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CountItems/CountMaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CountMaster {
this.log.info('got buckets infos', {
bucketCount: bucketList.bucketCount,
});
// monitoring.bucketCount.set(bucketList.bucketCount);
monitoring.bucketCount.set(bucketList.bucketCount);
this.manager.addWork(bucketList);
return next();
}),
Expand Down
2 changes: 1 addition & 1 deletion CountItems/masterProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const countMaster = new CountMaster({
});

metricServer.onRequest((req, res) => monitoring.metricsHandler(
countMaster.stop(null, () => process.exit(1)),
countMaster.stop.bind(countMaster),
req,
res,
));
Expand Down
3 changes: 2 additions & 1 deletion utils/monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const CountMaster = require('../CountItems/CountMaster');
const aggregatorRegistry = new promClient.AggregatorRegistry();
const { collectDefaultMetrics } = promClient;

const bucketCount = new promClient.Gauge({
const bucketCount = (promClient.register.getSingleMetric('bucketCount_metrics'))

Check failure on line 9 in utils/monitoring.js

View workflow job for this annotation

GitHub Actions / tests

Multiple spaces found before '('
||new promClient.Gauge({

Check failure on line 10 in utils/monitoring.js

View workflow job for this annotation

GitHub Actions / tests

Operator '||' must be spaced
name: 'bucketCount_metrics',

Check failure on line 11 in utils/monitoring.js

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 8 spaces but found 4
help: 'Total number of buckets',

Check failure on line 12 in utils/monitoring.js

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 8 spaces but found 4
labelNames: ['bucketName'],

Check failure on line 13 in utils/monitoring.js

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 8 spaces but found 4
Expand Down

0 comments on commit c1bf83b

Please sign in to comment.