Remove old web3signer metrics: v6 (#14920)

* removing repeated fork specific metrics for a universal one

* changelog
This commit is contained in:
james-prysm
2025-04-07 12:02:54 -05:00
committed by GitHub
parent 0d7d9bd5fc
commit 9a79f49514
3 changed files with 11 additions and 42 deletions

View File

@@ -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)
}

View File

@@ -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",