Skip to content

Commit

Permalink
Merge branch 'main' into 319-flush-batching
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary authored Feb 14, 2025
2 parents b4a4b05 + 3b93b2c commit 1fb1371
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 84 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 2.14.0: Release

- Catch errors from prom-client (#316) @hardillb

#### 2.13.0: Release


Expand Down
8 changes: 6 additions & 2 deletions lib/resources/resourcePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ module.exports = (RED) => {
const register = new Registry()
collectDefaultMetrics({ register })
RED.httpAdmin.get('/ff/metrics', async function (req, res) {
const metrics = await register.metrics()
res.send(metrics)
try {
const metrics = await register.metrics()
res.send(metrics)
} catch (err) {
res.status(500).send({ error: err.toString() })
}
})
RED.log.info('FlowFuse Metrics Plugin loaded')
}
Expand Down
161 changes: 80 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flowfuse/nr-launcher",
"version": "2.13.0",
"version": "2.14.0",
"description": "FlowFuse Launcher for running Node-RED",
"exports": {
"./auditLogger": "./lib/auditLogger/index.js",
Expand Down

0 comments on commit 1fb1371

Please sign in to comment.