Skip to content

Commit

Permalink
Fix metrics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Romans Karpelcevs committed Nov 15, 2022
1 parent 77dbd0f commit e2c0cf6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/api-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,11 @@ class APIServer {
);
});

this.server.get('/metrics', (req, res, next) => {
promClient.register
this.server.get('/metrics', async (req, res, next) => {
res.setHeader('Content-Type', promClient.register.contentType);
await promClient.register
.metrics()
.then(metrics => res.end(metrics))
.then(metrics => res.send(metrics))
.catch(err => {
log.error('API', err);
try {
Expand Down

0 comments on commit e2c0cf6

Please sign in to comment.