From 5fa9e95ba38040c05578925f49d218419a5b33bd Mon Sep 17 00:00:00 2001 From: james-prysm Date: Wed, 12 Feb 2025 16:32:43 -0600 Subject: [PATCH 1/2] removing repeated fork specific metrics for a universal one --- .../remote-web3signer/keymanager.go | 16 ++++----- .../keymanager/remote-web3signer/metrics.go | 34 ------------------- 2 files changed, 8 insertions(+), 42 deletions(-) diff --git a/validator/keymanager/remote-web3signer/keymanager.go b/validator/keymanager/remote-web3signer/keymanager.go index 1d050858343c..e34309a2b931 100644 --- a/validator/keymanager/remote-web3signer/keymanager.go +++ b/validator/keymanager/remote-web3signer/keymanager.go @@ -462,7 +462,7 @@ func handleBlock(ctx context.Context, validator *validator.Validate, request *va if err = validator.StructCtx(ctx, bockSignRequest); err != nil { return nil, err } - blockSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("phase0", "false").Inc() return json.Marshal(bockSignRequest) } @@ -522,7 +522,7 @@ func handleBlockAltair(ctx context.Context, validator *validator.Validate, reque if err = validator.StructCtx(ctx, blockv2AltairSignRequest); err != nil { return nil, err } - blockAltairSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("altair", "false").Inc() return json.Marshal(blockv2AltairSignRequest) } @@ -534,7 +534,7 @@ func handleBlockBellatrix(ctx context.Context, validator *validator.Validate, re if err = validator.StructCtx(ctx, blockv2BellatrixSignRequest); err != nil { return nil, err } - blockBellatrixSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("bellatrix", "false").Inc() return json.Marshal(blockv2BellatrixSignRequest) } @@ -546,7 +546,7 @@ func handleBlindedBlockBellatrix(ctx context.Context, validator *validator.Valid if err = validator.StructCtx(ctx, blindedBlockv2SignRequest); err != nil { return nil, err } - blindedBlockBellatrixSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("bellatrix", "true").Inc() return json.Marshal(blindedBlockv2SignRequest) } @@ -558,7 +558,7 @@ func handleBlockCapella(ctx context.Context, validator *validator.Validate, requ if err = validator.StructCtx(ctx, blockv2CapellaSignRequest); err != nil { return nil, err } - blockCapellaSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("capella", "false").Inc() return json.Marshal(blockv2CapellaSignRequest) } @@ -570,7 +570,7 @@ func handleBlindedBlockCapella(ctx context.Context, validator *validator.Validat if err = validator.StructCtx(ctx, blindedBlockv2CapellaSignRequest); err != nil { return nil, err } - blindedBlockCapellaSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("capella", "true").Inc() return json.Marshal(blindedBlockv2CapellaSignRequest) } @@ -582,7 +582,7 @@ func handleBlockDeneb(ctx context.Context, validator *validator.Validate, reques if err = validator.StructCtx(ctx, blockv2DenebSignRequest); err != nil { return nil, err } - blockDenebSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("deneb", "false").Inc() return json.Marshal(blockv2DenebSignRequest) } @@ -594,7 +594,7 @@ func handleBlindedBlockDeneb(ctx context.Context, validator *validator.Validate, if err = validator.StructCtx(ctx, blindedBlockv2DenebSignRequest); err != nil { return nil, err } - blindedBlockDenebSignRequestsTotal.Inc() + remoteBlockSignRequestsTotal.WithLabelValues("deneb", "true").Inc() return json.Marshal(blindedBlockv2DenebSignRequest) } diff --git a/validator/keymanager/remote-web3signer/metrics.go b/validator/keymanager/remote-web3signer/metrics.go index e40a131d93ca..93fab31dc7f6 100644 --- a/validator/keymanager/remote-web3signer/metrics.go +++ b/validator/keymanager/remote-web3signer/metrics.go @@ -27,40 +27,6 @@ var ( Name: "remote_web3signer_attestation_sign_requests_total", Help: "Total number of attestation sign requests", }) - //TODO: deprecate these fork specific counters in prysm v6... - blockSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_block_sign_requests_total", - Help: "Total number of block sign requests", - }) - blockAltairSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_block_altair_sign_requests_total", - Help: "Total number of block altair sign requests", - }) - blockBellatrixSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_block_bellatrix_sign_requests_total", - Help: "Total number of block bellatrix sign requests", - }) - blindedBlockBellatrixSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_blinded_block_bellatrix_sign_requests_total", - Help: "Total number of blinded block bellatrix sign requests", - }) - blockCapellaSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_block_capella_sign_requests_total", - Help: "Total number of block capella sign requests", - }) - blindedBlockCapellaSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_blinded_block_capella_sign_requests_total", - Help: "Total number of block capella sign requests", - }) - blockDenebSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_block_deneb_sign_requests_total", - Help: "Total number of block deneb sign requests", - }) - blindedBlockDenebSignRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ - Name: "remote_web3signer_blinded_block_deneb_sign_requests_total", - Help: "Total number of blinded block deneb sign requests", - }) - ///// remoteBlockSignRequestsTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "remote_block_sign_requests_total", From 03debd9b583ad40a073c676243fd23d9cae07085 Mon Sep 17 00:00:00 2001 From: james-prysm Date: Wed, 12 Feb 2025 16:33:58 -0600 Subject: [PATCH 2/2] changelog --- changelog/james-prysm_remove-old-web3signer-metrics.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/james-prysm_remove-old-web3signer-metrics.md diff --git a/changelog/james-prysm_remove-old-web3signer-metrics.md b/changelog/james-prysm_remove-old-web3signer-metrics.md new file mode 100644 index 000000000000..6069a3bc92ab --- /dev/null +++ b/changelog/james-prysm_remove-old-web3signer-metrics.md @@ -0,0 +1,3 @@ +### Changed + +- removed old web3signer metrics in favor for a universal one \ No newline at end of file