Skip to content

Commit

Permalink
fix: restore discv5 metrics (#5590)
Browse files Browse the repository at this point in the history
* fix: restore discv5 metrics

* review PR

---------

Co-authored-by: dapplion <[email protected]>
  • Loading branch information
wemeetagain and dapplion authored May 31, 2023
1 parent 2811142 commit 951fda6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/beacon-node/src/network/core/networkCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ export class NetworkCore implements INetworkCore {
}

async scrapeMetrics(): Promise<string> {
return (await this.metrics?.register.metrics()) ?? "";
return [
(await this.metrics?.register.metrics()) ?? "",
(await this.peerManager["discovery"]?.discv5.scrapeMetrics()) ?? "",
]
.filter((str) => str.length > 0)
.join("/n/n");
}

async updateStatus(status: phase0.Status): Promise<void> {
Expand Down

0 comments on commit 951fda6

Please sign in to comment.