class

LavinMQ::HTTP::MetricsServer

Inherits Reference < Object

Serves the Prometheus metrics endpoints. One instance lives for the whole process: what it reports follows the node's role, so it never has to be closed and rebound when a follower is promoted to leader. It reports as a follower until a server is set with #leader=.

Constants

Log = LavinMQ::Log.for("metrics.server")

Constructors

new(amqp_server : LavinMQ::Server | Nil = nil, clustering_client : LavinMQ::Clustering::Client | Nil = nil)
Source

Instance methods

bind_tcp(address, port)
Source
close
Source
follower=(client : LavinMQ::Clustering::Client | Nil) : Nil

Report as a follower of the leader that the client replicates from

Source
leader=(server : LavinMQ::Server) : Nil

Report as leader, with the full set of metrics from the server

Source
listen
Source