stats

package
v0.0.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMetrics = map[string]string{
	"publisher.consumer.fatal":           "Number of fatal errors on the consumer. Once a fatal error occurs, the reader process is eventually closed",
	"publisher.consumer.active":          "Number of active reader processes",
	"publisher.data.changeitems":         "Number of change-items (i.e. events) emitted by the source",
	"sinker.pusher.data.changeitems":     "Number of change-items (i.e. events) written to the target DB",
	"sinker.pusher.time.row_max_lag_sec": "Maximum change-item lag in seconds",
	"sinker.table.rows":                  "Number of rows written per data object (table)",
	"sinker.time.push":                   "Average time to push data to the target",
}

Functions

func Exponential10Buckets

func Exponential10Buckets() metrics.Buckets

Exponential10Buckets returns a set of buckets with borders at 10^[1..10]

func MillisecondDurationBuckets

func MillisecondDurationBuckets() metrics.DurationBuckets

MillisecondDurationBuckets returns buckets adapted for durations between 1 millisecond and 1 second

func ShortEvenDurationBuckets

func ShortEvenDurationBuckets() metrics.DurationBuckets

ShortEvenDurationBuckets returns buckets adapted for short durations and distributed approximately evenly

Types

type AuthStats

type AuthStats struct {
	// contains filtered or unexported fields
}

func NewAuthStats

func NewAuthStats(registry metrics.Registry) *AuthStats

func (*AuthStats) Add

func (s *AuthStats) Add(authSuccess bool)

type ChStats

type ChStats struct {
	Len   metrics.Counter
	Count metrics.Counter
	Size  metrics.Counter
	// contains filtered or unexported fields
}

func NewChStats

func NewChStats(registry metrics.Registry) *ChStats

func (*ChStats) HostGauge

func (s *ChStats) HostGauge(host string, metric string) metrics.Gauge

type FallbackStats

type FallbackStats struct {

	// Items counts the number of items to which fallbacks chain was applied
	Items metrics.Counter
	// Deepness tracks the number of fallbacks applied
	Deepness metrics.Gauge
	// Errors counts the number of errorneous fallbacks
	Errors metrics.Counter
	// contains filtered or unexported fields
}

type FallbackStatsCombination

type FallbackStatsCombination struct {
	Source *FallbackStats
	Target *FallbackStats
	// contains filtered or unexported fields
}

FallbackStatsCombination is an object unifying stats for source and target fallbacks

func NewFallbackStatsCombination

func NewFallbackStatsCombination(registry metrics.Registry) *FallbackStatsCombination

type MethodStat

type MethodStat struct {
	// contains filtered or unexported fields
}

func NewMethodStat

func NewMethodStat(registry metrics.Registry, service string, info grpc.MethodInfo) *MethodStat

func (*MethodStat) Code

func (m *MethodStat) Code(code codes.Code, duration time.Duration)

type MiddlewareBuffererStats

type MiddlewareBuffererStats struct {
	FlushOnAllCauses metrics.Counter
	FlushOnInterval  metrics.Counter
	FlushOnCount     metrics.Counter
	FlushOnSize      metrics.Counter
	FlushOnNonRow    metrics.Counter

	// CollectionTime tracks the time spent on collection of changeitems in the buffer (time between flush attempts).
	//
	// When this time is greater than `WaitTime`, this means transfer reads from the source slower than it writes into the destination. Source slows down the whole transfer.
	//
	// When `WaitTime` is greater than this time, this means transfer writes into the destination slower than it reads from the source. Destination slows down the whole transfer.
	CollectionTime metrics.Timer
	// WaitTime tracks the time spent waiting for another flush to finish (time of doing nothing during a flush attempt).
	WaitTime     metrics.Timer
	SizeToFlush  metrics.Histogram
	CountToFlush metrics.Histogram
	// contains filtered or unexported fields
}

func NewMiddlewareBuffererStats

func NewMiddlewareBuffererStats(r metrics.Registry) *MiddlewareBuffererStats

type MiddlewareErrorTrackerStats

type MiddlewareErrorTrackerStats struct {
	Failures  metrics.Counter
	Successes metrics.Counter
}

func NewMiddlewareErrorTrackerStats

func NewMiddlewareErrorTrackerStats(r metrics.Registry) *MiddlewareErrorTrackerStats

type MiddlewareFilterStats

type MiddlewareFilterStats struct {
	Dropped metrics.Counter
	// contains filtered or unexported fields
}

func NewMiddlewareFilterStats

func NewMiddlewareFilterStats(r metrics.Registry) *MiddlewareFilterStats

type MiddlewareTransformerStats

type MiddlewareTransformerStats struct {
	Dropped metrics.Counter
	Errors  metrics.Counter
	Elapsed metrics.Timer
	// contains filtered or unexported fields
}

func NewMiddlewareTransformerStats

func NewMiddlewareTransformerStats(r metrics.Registry) *MiddlewareTransformerStats

type NotificationStats

type NotificationStats struct {

	// Sent is the number of notifications sent successfully
	Sent metrics.Counter
	// Errors is the number of errors
	Errors metrics.Counter
	// contains filtered or unexported fields
}

func NewNotificationStats

func NewNotificationStats(registry metrics.Registry) *NotificationStats

type PoolStats

type PoolStats struct {
	RunningTransfers     metrics.Gauge
	DroppedTransfers     metrics.Counter
	NeedRestartTransfers metrics.Counter

	RunningOperations     metrics.Gauge
	FailedInitOperations  metrics.Counter
	PendingOperations     metrics.Gauge
	StaleTransfers        metrics.Gauge
	TaskScheduleTime      metrics.Timer
	TransferLastPingTime  metrics.Timer
	TransferErrors        metrics.Counter
	OperationLastPingTime metrics.Timer
	StaleOperations       metrics.Gauge
	StatusCount           map[string]metrics.Gauge
	// contains filtered or unexported fields
}

func NewPoolStats

func NewPoolStats(mtrc metrics.Registry) *PoolStats

func (PoolStats) SetStatusCount

func (s PoolStats) SetStatusCount(status string, count int)

type ReplicationStats

type ReplicationStats struct {
	StartUnix metrics.Gauge
	Running   metrics.Gauge
}

func NewReplicationStats

func NewReplicationStats(registry metrics.Registry) *ReplicationStats

type RepositoryStat

type RepositoryStat struct {
	DecodeTransferWithEndpointsError metrics.Counter
}

func NewRepositoryStat

func NewRepositoryStat() *RepositoryStat

type ServerMethodStat

type ServerMethodStat struct {
	// contains filtered or unexported fields
}

func NewServerMethods

func NewServerMethods(registry metrics.Registry) *ServerMethodStat

func (ServerMethodStat) Init

func (s ServerMethodStat) Init(server *grpc.Server)

func (ServerMethodStat) Method

func (s ServerMethodStat) Method(method string) *MethodStat

type SinkerStats

type SinkerStats struct {
	Inflight metrics.Counter
	Elapsed  metrics.Timer

	Wal metrics.Counter
	// contains filtered or unexported fields
}

func NewSinkerStats

func NewSinkerStats(registry metrics.Registry) *SinkerStats

func (*SinkerStats) RecordDuration

func (s *SinkerStats) RecordDuration(metric string, duration time.Duration)

func (*SinkerStats) Table

func (s *SinkerStats) Table(table string, metric string, rows int)

func (*SinkerStats) TargetRows

func (s *SinkerStats) TargetRows(table string, rows uint64)

type SourceStats

type SourceStats struct {
	Usage         metrics.Gauge
	CompressRatio metrics.Gauge
	Read          metrics.Gauge
	Extract       metrics.Gauge
	Master        metrics.Gauge
	DDLError      metrics.Counter
	Error         metrics.Counter
	Fatal         metrics.Counter
	Size          metrics.Counter
	Count         metrics.Counter
	ChangeItems   metrics.Counter
	Parsed        metrics.Counter
	Unparsed      metrics.Counter
	TransformTime metrics.Timer
	DecodeTime    metrics.Timer
	PushTime      metrics.Timer
	DelayTime     metrics.Timer
	// contains filtered or unexported fields
}

func NewSourceStats

func NewSourceStats(registry metrics.Registry) *SourceStats

func (*SourceStats) SourceRows

func (s *SourceStats) SourceRows(table string, rows uint64)

func (*SourceStats) WithTags

func (s *SourceStats) WithTags(tags map[string]string) *SourceStats

type TableStat

type TableStat struct {
	Source  metrics.Gauge
	Target  metrics.Gauge
	Diff    metrics.Gauge
	Metrics map[string]metrics.Counter
	// contains filtered or unexported fields
}

func NewTableMetrics

func NewTableMetrics(registry metrics.Registry, table string) *TableStat

type TypeStrictnessStats

type TypeStrictnessStats struct {
	Good metrics.Counter
	Bad  metrics.Counter
	// contains filtered or unexported fields
}

func NewTypeStrictnessStats

func NewTypeStrictnessStats(registry metrics.Registry) *TypeStrictnessStats

type WorkerStats

type WorkerStats struct {
	OOMKilled            metrics.Gauge
	OOMKills             metrics.Counter
	RestartFailure       metrics.Gauge
	RestartFailures      metrics.Counter
	FatalRestartFailure  metrics.Gauge
	FatalRestartFailures metrics.Counter
	InstanceStart        metrics.Counter
}

func NewWorkerStats

func NewWorkerStats(cpRegistry metrics.Registry, dpRegistry metrics.Registry) *WorkerStats

type WrapperStats

type WrapperStats struct {
	Lag               metrics.Timer
	MaxLag            metrics.Gauge
	Timer             metrics.Timer
	RowEventsPushed   metrics.Counter
	ChangeItemsPushed metrics.Counter
	MaxReadLag        metrics.Gauge
	// contains filtered or unexported fields
}

func NewWrapperStats

func NewWrapperStats(registry metrics.Registry) *WrapperStats

func (*WrapperStats) Log

func (s *WrapperStats) Log(logger log.Logger, startTime time.Time, input []abstract.ChangeItem, isDebugLog bool)

func (*WrapperStats) LogMaxReadLag

func (s *WrapperStats) LogMaxReadLag(input []abstract.ChangeItem)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL