Skip to content

Commit

Permalink
Use LoggerModule for vmon
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Sep 6, 2022
1 parent c844ba9 commit 5c80c02
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/beacon-node/src/node/nodejs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ enum LoggerModule {
eth1 = "eth1",
metrics = "metrics",
network = "network",
/** validator monitor */
vmon = "vmon",
rest = "rest",
sync = "sync",
}
Expand Down Expand Up @@ -143,7 +145,13 @@ export class BeaconNode {

let metrics = null;
if (opts.metrics.enabled) {
metrics = createMetrics(opts.metrics, config, anchorState, logger.child({module: "VMON"}), metricsRegistries);
metrics = createMetrics(
opts.metrics,
config,
anchorState,
logger.child({module: LoggerModule.vmon}),
metricsRegistries
);
initBeaconMetrics(metrics, anchorState);
// Since the db is instantiated before this, metrics must be injected manually afterwards
db.setMetrics(metrics.db);
Expand Down

0 comments on commit 5c80c02

Please sign in to comment.