Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHTTPHandlers ¶
RegisterHTTPHandlers registers and exposes prometheus metrics at /metrics endpoint to supplied mux
Types ¶
type InstrumentValve ¶
type InstrumentValve struct {
// contains filtered or unexported fields
}
InstrumentValve collect instrumentation data for reporting using prometheus
func NewInstrumentValve ¶
func NewInstrumentValve(frontend string, backend string) *InstrumentValve
NewInstrumentValve initialize a new valve with given frontend and backend. frontend and backend are expected to be ID values (string) for these systems.
func (*InstrumentValve) AfterReceive ¶
AfterReceive instrument messages after being received from backend
func (*InstrumentValve) BeforeTransmit ¶
BeforeTransmit instrument messages before they are transmitted to backend
type PrometheusProvider ¶
type PrometheusProvider struct{}
PrometheusProvider Prometheus valve provider for usage within balancer frontend
func (*PrometheusProvider) AddValves ¶
func (pip *PrometheusProvider) AddValves(session *common.ProxySession, currentValves []common.MessageValve) []common.MessageValve
AddValves adds prometheus instrumentation valve at the begining of the supplied chain
func (*PrometheusProvider) SessionCreated ¶
func (pip *PrometheusProvider) SessionCreated(session *common.ProxySession)
SessionCreated registers a new session in promethus total session counter and increments the current active session gauge.
func (*PrometheusProvider) SessionTerminated ¶
func (pip *PrometheusProvider) SessionTerminated(session *common.ProxySession)
SessionTerminated decrements the current active session gauge.