1+ import { SubnetID } from "@lodestar/types" ;
12import { RegistryMetricCreator } from "../../metrics/utils/registryMetricCreator.js" ;
23import { SubnetType } from "../metadata.js" ;
34import { DiscoveredPeerStatus } from "../peers/discover.js" ;
@@ -194,14 +195,14 @@ export function createNetworkCoreMetrics(register: RegistryMetricCreator) {
194195 name : "lodestar_attnets_service_committee_subscriptions_total" ,
195196 help : "Count of committee subscriptions" ,
196197 } ) ,
197- subscriptionsCommitteeMeshPeers : register . histogram < { subnet : number } > ( {
198+ subscriptionsCommitteeMeshPeers : register . histogram < { subnet : SubnetID } > ( {
198199 name : "lodestar_attnets_service_committee_subscriptions_mesh_peers" ,
199200 help : "Histogram of mesh peers per committee subscription" ,
200201 labelNames : [ "subnet" ] ,
201202 // Dlow = 6, D = 8, DHi = 12 plus 2 more buckets
202203 buckets : [ 0 , 4 , 6 , 8 , 12 ] ,
203204 } ) ,
204- subscriptionsCommitteeTimeToStableMesh : register . histogram < { subnet : number } > ( {
205+ subscriptionsCommitteeTimeToStableMesh : register . histogram < { subnet : SubnetID } > ( {
205206 name : "lodestar_attnets_service_committee_subscriptions_time_to_stable_mesh_seconds" ,
206207 help : "Histogram of time until committee subscription is considered healthy (>= 6 mesh peers)" ,
207208 labelNames : [ "subnet" ] ,
@@ -216,12 +217,12 @@ export function createNetworkCoreMetrics(register: RegistryMetricCreator) {
216217 name : "lodestar_attnets_service_long_lived_subscriptions_total" ,
217218 help : "Count of long lived subscriptions" ,
218219 } ) ,
219- subscribeSubnets : register . gauge < { subnet : number ; src : SubnetSource } > ( {
220+ subscribeSubnets : register . gauge < { subnet : SubnetID ; src : SubnetSource } > ( {
220221 name : "lodestar_attnets_service_subscribe_subnets_total" ,
221222 help : "Count of subscribe_subnets calls" ,
222223 labelNames : [ "subnet" , "src" ] ,
223224 } ) ,
224- unsubscribeSubnets : register . gauge < { subnet : number ; src : SubnetSource } > ( {
225+ unsubscribeSubnets : register . gauge < { subnet : SubnetID ; src : SubnetSource } > ( {
225226 name : "lodestar_attnets_service_unsubscribe_subnets_total" ,
226227 help : "Count of unsubscribe_subnets calls" ,
227228 labelNames : [ "subnet" , "src" ] ,
@@ -237,12 +238,12 @@ export function createNetworkCoreMetrics(register: RegistryMetricCreator) {
237238 name : "lodestar_syncnets_service_committee_subscriptions_total" ,
238239 help : "Count of syncnet committee subscriptions" ,
239240 } ) ,
240- subscribeSubnets : register . gauge < { subnet : number } > ( {
241+ subscribeSubnets : register . gauge < { subnet : SubnetID } > ( {
241242 name : "lodestar_syncnets_service_subscribe_subnets_total" ,
242243 help : "Count of syncnet subscribe_subnets calls" ,
243244 labelNames : [ "subnet" ] ,
244245 } ) ,
245- unsubscribeSubnets : register . gauge < { subnet : number } > ( {
246+ unsubscribeSubnets : register . gauge < { subnet : SubnetID } > ( {
246247 name : "lodestar_syncnets_service_unsubscribe_subnets_total" ,
247248 help : "Count of syncnet unsubscribe_subnets calls" ,
248249 labelNames : [ "subnet" ] ,
0 commit comments