diff --git a/monitoring/metricsreporter/metrics_reporter.go b/monitoring/metricsreporter/metrics_reporter.go index efcc02a7dc..9efd036dfc 100644 --- a/monitoring/metricsreporter/metrics_reporter.go +++ b/monitoring/metricsreporter/metrics_reporter.go @@ -27,7 +27,6 @@ const ( executionClientSyncing = float64(1) executionClientOK = float64(2) - validatorInactive = float64(0) validatorNoIndex = float64(1) validatorError = float64(2) validatorReady = float64(3) @@ -62,14 +61,6 @@ var ( Name: "ssv:validator:v2:status", Help: "Validator status", }, []string{"pubKey"}) - eventProcessed = promauto.NewCounterVec(prometheus.CounterOpts{ - Name: "ssv_eth1_sync_count_success", - Help: "Count succeeded execution client events", - }, []string{"etype"}) - eventProcessingFailed = promauto.NewCounterVec(prometheus.CounterOpts{ - Name: "ssv_eth1_sync_count_failed", - Help: "Count failed execution client events", - }, []string{"etype"}) operatorIndex = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "ssv:exporter:operator_index", Help: "operator footprint", @@ -170,7 +161,6 @@ type MetricsReporter interface { ExecutionClientFailure() ExecutionClientLastFetchedBlock(block uint64) OperatorPublicKey(operatorID spectypes.OperatorID, publicKey []byte) - ValidatorInactive(publicKey []byte) ValidatorNoIndex(publicKey []byte) ValidatorError(publicKey []byte) ValidatorReady(publicKey []byte) @@ -181,13 +171,9 @@ type MetricsReporter interface { ValidatorPending(publicKey []byte) ValidatorRemoved(publicKey []byte) ValidatorUnknown(publicKey []byte) - EventProcessed(eventName string) - EventProcessingFailed(eventName string) MessagesReceivedFromPeer(peerId peer.ID) MessagesReceivedTotal() MessageValidationRSAVerifications() - LastBlockProcessed(block uint64) - LogsProcessingError(err error) MessageAccepted(role spectypes.RunnerRole, round specqbft.Round) MessageIgnored(reason string, role spectypes.RunnerRole, round specqbft.Round) MessageRejected(reason string, role spectypes.RunnerRole, round specqbft.Round) @@ -232,8 +218,6 @@ func New(opts ...Option) MetricsReporter { executionClientStatus, executionClientLastFetchedBlock, validatorStatus, - eventProcessed, - eventProcessingFailed, operatorIndex, messageValidationResult, messageValidationSSVType, @@ -299,9 +283,6 @@ func (m *metricsReporter) OperatorPublicKey(operatorID spectypes.OperatorID, pub operatorIndex.WithLabelValues(pkHash, strconv.FormatUint(operatorID, 10)).Set(float64(operatorID)) } -func (m *metricsReporter) ValidatorInactive(publicKey []byte) { - validatorStatus.WithLabelValues(ethcommon.Bytes2Hex(publicKey)).Set(validatorInactive) -} func (m *metricsReporter) ValidatorNoIndex(publicKey []byte) { validatorStatus.WithLabelValues(ethcommon.Bytes2Hex(publicKey)).Set(validatorNoIndex) } @@ -333,14 +314,6 @@ func (m *metricsReporter) ValidatorUnknown(publicKey []byte) { validatorStatus.WithLabelValues(ethcommon.Bytes2Hex(publicKey)).Set(validatorUnknown) } -func (m *metricsReporter) EventProcessed(eventName string) { - eventProcessed.WithLabelValues(eventName).Inc() -} - -func (m *metricsReporter) EventProcessingFailed(eventName string) { - eventProcessingFailed.WithLabelValues(eventName).Inc() -} - func (m *metricsReporter) MessagesReceivedFromPeer(peerId peer.ID) { messagesReceivedFromPeer.WithLabelValues(peerId.String()).Inc() } @@ -353,10 +326,6 @@ func (m *metricsReporter) MessageValidationRSAVerifications() { messageValidationRSAVerifications.WithLabelValues().Inc() } -// TODO implement -func (m *metricsReporter) LastBlockProcessed(uint64) {} -func (m *metricsReporter) LogsProcessingError(error) {} - func (m *metricsReporter) MessageAccepted(role spectypes.RunnerRole, round specqbft.Round) { messageValidationResult.WithLabelValues( messageAccepted, diff --git a/monitoring/metricsreporter/nop_metrics_reporter.go b/monitoring/metricsreporter/nop_metrics_reporter.go index a17ed5b36d..363e1d2234 100644 --- a/monitoring/metricsreporter/nop_metrics_reporter.go +++ b/monitoring/metricsreporter/nop_metrics_reporter.go @@ -23,7 +23,6 @@ func (n *nopMetrics) ExecutionClientSyncing() func (n *nopMetrics) ExecutionClientFailure() {} func (n *nopMetrics) ExecutionClientLastFetchedBlock(block uint64) {} func (n *nopMetrics) OperatorPublicKey(operatorID spectypes.OperatorID, publicKey []byte) {} -func (n *nopMetrics) ValidatorInactive(publicKey []byte) {} func (n *nopMetrics) ValidatorNoIndex(publicKey []byte) {} func (n *nopMetrics) ValidatorError(publicKey []byte) {} func (n *nopMetrics) ValidatorReady(publicKey []byte) {} @@ -34,13 +33,9 @@ func (n *nopMetrics) ValidatorNotFound(publicKey []byte) func (n *nopMetrics) ValidatorPending(publicKey []byte) {} func (n *nopMetrics) ValidatorRemoved(publicKey []byte) {} func (n *nopMetrics) ValidatorUnknown(publicKey []byte) {} -func (n *nopMetrics) EventProcessed(eventName string) {} -func (n *nopMetrics) EventProcessingFailed(eventName string) {} func (n *nopMetrics) MessagesReceivedFromPeer(peerId peer.ID) {} func (n *nopMetrics) MessagesReceivedTotal() {} func (n *nopMetrics) MessageValidationRSAVerifications() {} -func (n *nopMetrics) LastBlockProcessed(block uint64) {} -func (n *nopMetrics) LogsProcessingError(err error) {} func (n *nopMetrics) GenesisMessageAccepted(role genesisspectypes.BeaconRole, round genesisspecqbft.Round) { } func (n *nopMetrics) GenesisMessageIgnored(reason string, role genesisspectypes.BeaconRole, round genesisspecqbft.Round) { diff --git a/protocol/genesis/ssv/validator/metrics.go b/protocol/genesis/ssv/validator/metrics.go index f6956b141f..bf2e946af4 100644 --- a/protocol/genesis/ssv/validator/metrics.go +++ b/protocol/genesis/ssv/validator/metrics.go @@ -9,7 +9,6 @@ import ( ) type Metrics interface { - ValidatorInactive(publicKey []byte) ValidatorNoIndex(publicKey []byte) ValidatorError(publicKey []byte) ValidatorReady(publicKey []byte) @@ -26,7 +25,6 @@ type Metrics interface { type NopMetrics struct{} -func (n NopMetrics) ValidatorInactive([]byte) {} func (n NopMetrics) ValidatorNoIndex([]byte) {} func (n NopMetrics) ValidatorError([]byte) {} func (n NopMetrics) ValidatorReady([]byte) {} diff --git a/protocol/v2/ssv/validator/metrics.go b/protocol/v2/ssv/validator/metrics.go index fa310456d2..4b79cb8dde 100644 --- a/protocol/v2/ssv/validator/metrics.go +++ b/protocol/v2/ssv/validator/metrics.go @@ -9,7 +9,6 @@ import ( ) type Metrics interface { - ValidatorInactive(publicKey []byte) ValidatorNoIndex(publicKey []byte) ValidatorError(publicKey []byte) ValidatorReady(publicKey []byte) @@ -26,7 +25,6 @@ type Metrics interface { type NopMetrics struct{} -func (n NopMetrics) ValidatorInactive([]byte) {} func (n NopMetrics) ValidatorNoIndex([]byte) {} func (n NopMetrics) ValidatorError([]byte) {} func (n NopMetrics) ValidatorReady([]byte) {}