Documentation ¶
Index ¶
- Constants
- type Metricer
- type Metrics
- func (m *Metrics) RecordHealthCheck(success bool, err error)
- func (m *Metrics) RecordInfo(version string)
- func (m *Metrics) RecordLeaderTransfer(success bool)
- func (m *Metrics) RecordLoopExecutionTime(duration float64)
- func (m *Metrics) RecordStartSequencer(success bool)
- func (m *Metrics) RecordStateChange(leader bool, healthy bool, active bool)
- func (m *Metrics) RecordStopSequencer(success bool)
- func (m *Metrics) RecordUp()
- func (m *Metrics) Registry() *prometheus.Registry
- func (m *Metrics) Start(host string, port int) (*httputil.HTTPServer, error)
- type NoopMetricsImpl
- func (*NoopMetricsImpl) RecordHealthCheck(success bool, err error)
- func (*NoopMetricsImpl) RecordInfo(version string)
- func (*NoopMetricsImpl) RecordLeaderTransfer(success bool)
- func (*NoopMetricsImpl) RecordLoopExecutionTime(duration float64)
- func (*NoopMetricsImpl) RecordStartSequencer(success bool)
- func (*NoopMetricsImpl) RecordStateChange(leader bool, healthy bool, active bool)
- func (*NoopMetricsImpl) RecordStopSequencer(success bool)
- func (*NoopMetricsImpl) RecordUp()
Constants ¶
View Source
const Namespace = "op_conductor"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metricer ¶
type Metricer interface { RecordInfo(version string) RecordUp() RecordStateChange(leader bool, healthy bool, active bool) RecordLeaderTransfer(success bool) RecordStartSequencer(success bool) RecordStopSequencer(success bool) RecordHealthCheck(success bool, err error) RecordLoopExecutionTime(duration float64) }
var NoopMetrics Metricer = new(NoopMetricsImpl)
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) RecordHealthCheck ¶
RecordHealthCheck increments the healthChecks counter.
func (*Metrics) RecordInfo ¶
RecordInfo sets a pseudo-metric that contains versioning and config info for the op-proposer.
func (*Metrics) RecordLeaderTransfer ¶
RecordLeaderTransfer increments the leaderTransfers counter.
func (*Metrics) RecordLoopExecutionTime ¶
RecordLoopExecutionTime records the time it took to execute the conductor loop.
func (*Metrics) RecordStartSequencer ¶
RecordStartSequencer increments the sequencerStarts counter.
func (*Metrics) RecordStateChange ¶
RecordStateChange increments the stateChanges counter.
func (*Metrics) RecordStopSequencer ¶
RecordStopSequencer increments the sequencerStops counter.
func (*Metrics) Registry ¶
func (m *Metrics) Registry() *prometheus.Registry
type NoopMetricsImpl ¶
type NoopMetricsImpl struct{}
func (*NoopMetricsImpl) RecordHealthCheck ¶
func (*NoopMetricsImpl) RecordHealthCheck(success bool, err error)
func (*NoopMetricsImpl) RecordInfo ¶
func (*NoopMetricsImpl) RecordInfo(version string)
func (*NoopMetricsImpl) RecordLeaderTransfer ¶
func (*NoopMetricsImpl) RecordLeaderTransfer(success bool)
func (*NoopMetricsImpl) RecordLoopExecutionTime ¶
func (*NoopMetricsImpl) RecordLoopExecutionTime(duration float64)
func (*NoopMetricsImpl) RecordStartSequencer ¶
func (*NoopMetricsImpl) RecordStartSequencer(success bool)
func (*NoopMetricsImpl) RecordStateChange ¶
func (*NoopMetricsImpl) RecordStateChange(leader bool, healthy bool, active bool)
func (*NoopMetricsImpl) RecordStopSequencer ¶
func (*NoopMetricsImpl) RecordStopSequencer(success bool)
func (*NoopMetricsImpl) RecordUp ¶
func (*NoopMetricsImpl) RecordUp()
Click to show internal directories.
Click to hide internal directories.