Skip to content

Commit

Permalink
feat(cmn): BSV2 collects default metrics (#2754)
Browse files Browse the repository at this point in the history
Have BSV2 collect default node metrics

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
smartcontracts and mergify[bot] committed Jun 10, 2022
1 parent 2040dc5 commit c201f3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-coats-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/common-ts': patch
---

Collect default node metrics
6 changes: 6 additions & 0 deletions packages/common-ts/src/base-service/base-service-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ export abstract class BaseServiceV2<
},
1
)

// Collect default node metrics.
prometheus.collectDefaultMetrics({
register: this.metricsRegistry,
labels: { name: params.name, version: params.version },
})
}

/**
Expand Down

0 comments on commit c201f3f

Please sign in to comment.