Skip to content

Commit

Permalink
feat(beacon-node): add block error metric to gossip handlers (#5495)
Browse files Browse the repository at this point in the history
* feat(beacon-node): add block error metric to gossip handlers

* refactor(beacon-node): update gossip processBlock error metrics

* refactor: update metric with default blockErrorCode value

* shorter label name

* feat(dashboards): remove Unknown Parent from dashboard title

* Revert "feat(dashboards): remove Unknown Parent from dashboard title"

This reverts commit 56844f5.

---------

Co-authored-by: dapplion <[email protected]>
  • Loading branch information
matthewkeil and dapplion committed May 25, 2023
1 parent 118f7b9 commit 8023e3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/beacon-node/src/metrics/metrics/lodestar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,11 @@ export function createLodestarMetrics(
help: "Time elapsed between block received and block import",
buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
}),
processBlockErrors: register.gauge<"error">({
name: "lodestar_gossip_block_process_block_errors",
help: "Count of errors, by error type, while processing blocks",
labelNames: ["error"],
}),
},
importBlock: {
persistBlockNoSerializedDataCount: register.gauge({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export function getGossipHandlers(modules: ValidatorFnsModules, options: GossipH
core.reportPeer(peerIdStr, PeerAction.LowToleranceError, "BadGossipBlock");
}
}
metrics?.gossipBlock.processBlockErrors.inc({error: e instanceof BlockError ? e.type.code : "NOT_BLOCK_ERROR"});
logger.error("Error receiving block", {slot: signedBlock.message.slot, peer: peerIdStr}, e as Error);
});
}
Expand Down

0 comments on commit 8023e3f

Please sign in to comment.