network: drop deprecated serv_node_version metric

A part of #3454.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2024-11-19 21:42:45 +03:00
parent 125f757988
commit 632092b2cd
3 changed files with 0 additions and 27 deletions

View file

@ -25,15 +25,6 @@ APIs/commands/configurations will be removed and here is a list of scheduled
breaking changes. Consider changing your code/scripts/configurations if you're breaking changes. Consider changing your code/scripts/configurations if you're
using anything mentioned here. using anything mentioned here.
## `serv_node_version` Prometheus gauge metric
This metric is replaced by the new `neogo_version` and `server_id` Prometheus gauge
metrics with proper version formatting. `neogo_version` contains NeoGo version
hidden under `version` label and `server_id` contains network server ID hidden
under `server_id` label.
Removal of `serv_node_version` is scheduled for Jun-Jul 2024 (~0.107.0 release).
## RPC error codes returned by old versions and C#-nodes ## RPC error codes returned by old versions and C#-nodes
NeoGo retains certain deprecated error codes: `neorpc.ErrCompatGeneric`, NeoGo retains certain deprecated error codes: `neorpc.ErrCompatGeneric`,

View file

@ -25,16 +25,6 @@ var (
}, },
) )
// Deprecated: please, use neogoVersion and serverID instead.
servAndNodeVersion = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Help: "Server and Node versions",
Name: "serv_node_version",
Namespace: "neogo",
},
[]string{"description", "value"},
)
neogoVersion = prometheus.NewGaugeVec( neogoVersion = prometheus.NewGaugeVec(
prometheus.GaugeOpts{ prometheus.GaugeOpts{
Help: "NeoGo version", Help: "NeoGo version",
@ -82,7 +72,6 @@ func init() {
prometheus.MustRegister( prometheus.MustRegister(
estimatedNetworkSize, estimatedNetworkSize,
peersConnected, peersConnected,
servAndNodeVersion,
neogoVersion, neogoVersion,
serverID, serverID,
poolCount, poolCount,
@ -122,12 +111,6 @@ func updatePeersConnectedMetric(pConnected int) {
peersConnected.Set(float64(pConnected)) peersConnected.Set(float64(pConnected))
} }
// Deprecated: please, use setNeoGoVersion and setSeverID instead.
func setServerAndNodeVersions(nodeVer string, serverID string) {
servAndNodeVersion.WithLabelValues("Node version: ", nodeVer).Add(0)
servAndNodeVersion.WithLabelValues("Server id: ", serverID).Add(0)
}
func setNeoGoVersion(nodeVer string) { func setNeoGoVersion(nodeVer string) {
neogoVersion.WithLabelValues(nodeVer).Add(1) neogoVersion.WithLabelValues(nodeVer).Add(1)
} }

View file

@ -318,7 +318,6 @@ func (s *Server) Start() {
for _, tr := range s.transports { for _, tr := range s.transports {
go tr.Accept() go tr.Accept()
} }
setServerAndNodeVersions(s.UserAgent, strconv.FormatUint(uint64(s.id), 10))
setNeoGoVersion(config.Version) setNeoGoVersion(config.Version)
setSeverID(strconv.FormatUint(uint64(s.id), 10)) setSeverID(strconv.FormatUint(uint64(s.id), 10))
go s.run() go s.run()