Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
matteodisabatino committed Jan 16, 2021
1 parent fe61566 commit 828fea7
Show file tree
Hide file tree
Showing 3 changed files with 11,500 additions and 1,986 deletions.
11 changes: 8 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ function instrument(server, options) {

server.use(middleware);

server.get(opt.url, (req, res) => {
res.header("content-type", "text/plain; charset=utf-8");
return res.send(client.register.metrics());
server.get(opt.url, async (req, res,next) => {
try {
res.header("content-type", "text/plain; charset=utf-8");
res.send(await client.register.metrics());
} catch (e) {
next(e);
}
});
}

module.exports = {
client,
instrument
Expand Down

0 comments on commit 828fea7

Please sign in to comment.