Skip to content

Commit

Permalink
fix(cmn): legacy metrics binds to 0.0.0.0 (#2620)
Browse files Browse the repository at this point in the history
Updates legacy MetricsServer to bind to 0.0.0.0 instead of 127.0.0.1 by
default which makes it possible to expose the metrics server from inside
docker. Only the DTL is still using legacy metrics, so should be fine.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
smartcontracts and mergify[bot] committed May 26, 2022
1 parent 36cbfbf commit f16383f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cyan-ravens-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/common-ts': patch
---

Have legacy BaseService metrics bind to 0.0.0.0 by default
2 changes: 1 addition & 1 deletion packages/common-ts/src/common/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const createMetricsServer = async (
})

const port = options.port || 7300
const hostname = options.hostname || '127.0.0.1'
const hostname = options.hostname || '0.0.0.0'
const server = app.listen(port, hostname, () => {
logger.info('Metrics server started', {
port,
Expand Down

0 comments on commit f16383f

Please sign in to comment.