Documentation ¶
Index ¶
Constants ¶
View Source
const ( BinlogEventCostStageDDLExec = "ddl-exec" BinlogEventCostStageDMLExec = "dml-exec" BinlogEventCostStageGenWriteRows = "gen-write-rows" BinlogEventCostStageGenUpdateRows = "gen-update-rows" BinlogEventCostStageGenDeleteRows = "gen-delete-rows" BinlogEventCostStageGenQuery = "gen-query" )
for BinlogEventCost metric stage field.
Variables ¶
This section is empty.
Functions ¶
func RegisterValidatorMetrics ¶
func RegisterValidatorMetrics(registry *prometheus.Registry)
func RemoveValidatorLabelValuesWithTask ¶
func RemoveValidatorLabelValuesWithTask(task string)
Types ¶
type Metrics ¶
type Metrics struct { BinlogReadDurationHistogram prometheus.Observer BinlogEventSizeHistogram prometheus.Observer ConflictDetectDurationHistogram prometheus.Observer IdealQPS prometheus.Gauge BinlogMasterPosGauge prometheus.Gauge BinlogSyncerPosGauge prometheus.Gauge BinlogMasterFileGauge prometheus.Gauge BinlogSyncerFileGauge prometheus.Gauge BinlogEventRowHistogram prometheus.Observer TxnHistogram prometheus.Observer QueryHistogram prometheus.Observer ExitWithResumableErrorCounter prometheus.Counter ExitWithNonResumableErrorCounter prometheus.Counter ReplicationLagGauge prometheus.Gauge ReplicationLagHistogram prometheus.Observer RemainingTimeGauge prometheus.Gauge ShardLockResolving prometheus.Gauge FinishedTransactionTotal prometheus.Counter FlushCheckPointsTimeInterval prometheus.Observer }
Metrics groups syncer's metric variables.
type Proxies ¶
type Proxies struct { Metrics *Metrics BinlogEventCost *prometheus.HistogramVec AddJobDurationHistogram *prometheus.HistogramVec // dispatch/add multiple jobs for one binlog event. // NOTE: only observe for DML now. DispatchBinlogDurationHistogram *prometheus.HistogramVec SkipBinlogDurationHistogram *prometheus.HistogramVec AddedJobsTotal *prometheus.CounterVec FinishedJobsTotal *prometheus.CounterVec QueueSizeGauge *prometheus.GaugeVec StmtHistogram *prometheus.HistogramVec UnsyncedTableGauge *prometheus.GaugeVec ReplicationTransactionBatch *prometheus.HistogramVec // contains filtered or unexported fields }
Proxies provides the ability to clean Metrics values when syncer is closed. private members have a corresponding cached variable in Metrics.
var DefaultMetricsProxies *Proxies
func (*Proxies) CacheForOneTask ¶
CacheForOneTask returns a new Proxies with m.Metrics filled. It is used to avoid calling WithLabelValues in hot path.
func (*Proxies) RegisterMetrics ¶
func (m *Proxies) RegisterMetrics(registry *prometheus.Registry)
RegisterMetrics registers Proxies.
func (*Proxies) RemoveLabelValuesWithTaskInMetrics ¶
RemoveLabelValuesWithTaskInMetrics cleans all Metrics related to the task.
type ValidatorMetrics ¶
type ValidatorMetrics struct { ErrorCount prometheus.Gauge LogPosLatency prometheus.Gauge LogFileLatency prometheus.Gauge BinlogFile prometheus.Gauge BinlogPos prometheus.Gauge }
func NewValidatorMetrics ¶
func NewValidatorMetrics(taskName, sourceID string) *ValidatorMetrics
Click to show internal directories.
Click to hide internal directories.