Skip to content

Commit

Permalink
fix(cmon): Use the correct 'layer' label
Browse files Browse the repository at this point in the history
Node connection error events were being emitted with a lable named
'chainId', which was not defined on the metrics spec.
This was causing nodeConnectionFailures to be treated as unhandled
errors.
  • Loading branch information
maurelian committed Apr 17, 2023
1 parent fdaa95b commit a26c484
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/old-poets-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/chain-mon': patch
---

Fixes a bug in the wd-mon service where a node connection failure event was not handled correctly
2 changes: 1 addition & 1 deletion packages/chain-mon/src/wd-mon/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class WithdrawalMonitor extends BaseServiceV2<Options, Metrics, State> {
section: 'getBlockNumber',
})
this.metrics.nodeConnectionFailures.inc({
chainId: this.state.messenger.l1ChainId,
layer: 'l1',
section: 'getBlockNumber',
})
await sleep(this.options.sleepTimeMs)
Expand Down

0 comments on commit a26c484

Please sign in to comment.