diff --git a/ROADMAP.md b/ROADMAP.md index 669b0b259..dbeabf41d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -50,15 +50,6 @@ Receive* APIs. Removal of these APIs is scheduled for May 2023 (~0.103.0 release). -## Prometheus RPC counters - -A number of neogo_${method}_called Prometheus counters are marked as -deprecated since version 0.99.5, neogo_rpc_${method}_time histograms can be -used instead (that also have a counter). - -It's not a frequently used thing and it's easy to replace it, so removal of -old counters is scheduled for January-February 2023 (~0.100.X release). - ## SecondsPerBlock protocol configuration With 0.100.0 version SecondsPerBlock protocol configuration setting was diff --git a/pkg/services/rpcsrv/prometheus.go b/pkg/services/rpcsrv/prometheus.go index b90f1ae94..4e24a4e9d 100644 --- a/pkg/services/rpcsrv/prometheus.go +++ b/pkg/services/rpcsrv/prometheus.go @@ -1,7 +1,6 @@ package rpcsrv import ( - "fmt" "strings" "time" @@ -10,8 +9,7 @@ import ( // Metrics used in monitoring service. var ( - rpcCounter = map[string]prometheus.Counter{} - rpcTimes = map[string]prometheus.Histogram{} + rpcTimes = map[string]prometheus.Histogram{} ) func addReqTimeMetric(name string, t time.Duration) { @@ -19,22 +17,9 @@ func addReqTimeMetric(name string, t time.Duration) { if ok { hist.Observe(t.Seconds()) } - ctr, ok := rpcCounter[name] - if ok { - ctr.Inc() - } } func regCounter(call string) { - ctr := prometheus.NewCounter( - prometheus.CounterOpts{ - Help: fmt.Sprintf("Number of calls to %s rpc endpoint (obsolete, to be removed)", call), - Name: fmt.Sprintf("%s_called", call), - Namespace: "neogo", - }, - ) - prometheus.MustRegister(ctr) - rpcCounter[call] = ctr rpcTimes[call] = prometheus.NewHistogram( prometheus.HistogramOpts{ Help: "RPC " + call + " call handling time",