metrics

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Init initializes global metrics structure

Types

type ChangelogReader

type ChangelogReader struct {
	Events

	ChangelogRowEventsWritten   *Counter
	ChangelogAlterTableEvents   *Counter
	ChangelogQueryEventsWritten *Counter
	ChangelogUnhandledEvents    *Counter

	TimeToEncounter *Timer

	NumTablesIngesting *Counter

	Errors *Counter

	LockLost *Counter
}

ChangelogReader contains metrics related to changelog reader

func NewChangelogReaderMetrics

func NewChangelogReaderMetrics(tags map[string]string) *ChangelogReader

NewChangelogReaderMetrics initializes and returns a Changelog metrics object

type Counter

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

Counter is a stateful counter statistics variable

func CounterInit

func CounterInit(s scope, name string) *Counter

CounterInit is a constructor for Counter

func (*Counter) Dec

func (p *Counter) Dec(v int64)

Dec increments the value by v

func (*Counter) Emit

func (p *Counter) Emit()

Emit current value

func (*Counter) Get

func (p *Counter) Get() int64

Get returns current value of the counter

func (*Counter) Inc

func (p *Counter) Inc(v int64)

Inc increments the value by v

func (*Counter) Set

func (p *Counter) Set(v int64)

Set sets the value of the counter gauge to a specific value

type Events

type Events struct {
	NumWorkers    *ProcessCounter
	EventsRead    *Counter
	EventsWritten *Counter
	BytesRead     *Counter
	BytesWritten  *Counter
	BatchSize     *Timer

	ReadLatency    *Timer
	ProduceLatency *Timer
}

Events represents the common structure for event based metrics

type FilePipeMetrics

type FilePipeMetrics struct {
	BytesWritten *Counter
	BytesRead    *Counter
	FilesCreated *Counter
	FilesOpened  *Counter
	FilesClosed  *Counter // == FilesCreated
}

FilePipeMetrics ...

func NewFilePipeMetrics

func NewFilePipeMetrics(prefix string, tags map[string]string) *FilePipeMetrics

NewFilePipeMetrics initializes and returns a FilePipeMetrics object

type ProcessCounter

type ProcessCounter struct {
	MStarted  *Counter
	MFinished *Counter
	MRunning  *Counter

	Started  int64
	Finished int64
}

ProcessCounter counts number of started, finished and currently running processes

var IdleWorkers *ProcessCounter

IdleWorkers count idle workers

func ProcessCounterInit

func ProcessCounterInit(c scope, name string) *ProcessCounter

ProcessCounterInit is the constructor for ProcessCounter

func (*ProcessCounter) Dec

func (p *ProcessCounter) Dec()

Dec decrements number of processes finished and reports metric for number of finished and running processes

func (*ProcessCounter) Emit

func (p *ProcessCounter) Emit()

Emit current value

func (*ProcessCounter) Get

func (p *ProcessCounter) Get() int64

Get returns number of currently running processes

func (*ProcessCounter) Inc

func (p *ProcessCounter) Inc()

Inc increments number of processes started and reports metric for number of started and running processes

type Snapshot

type Snapshot struct {
	Events
	Errors      *Counter
	Duration    *Timer
	SizeRead    *Counter
	SizeWritten *Counter
	ThrottledUs *Counter
}

Snapshot contains metrics related to snapshot reader

func NewSnapshotMetrics

func NewSnapshotMetrics(prefix string, tags map[string]string) *Snapshot

NewSnapshotMetrics initializes and returns a Snapshot metrics object

type State

type State struct {
	NumTablesRegistered *Counter

	Sync         *ProcessCounter
	SyncDuration *Timer

	TableReg         *ProcessCounter
	TableRegDuration *Timer

	TableDereg         *ProcessCounter
	TableDeregDuration *Timer

	SyncErrors *Counter
}

State contains metrics related to state

func NewStateMetrics

func NewStateMetrics() *State

NewStateMetrics initializes and returns a State metrics object

type Streamer

type Streamer struct {
	Events
	TimeInBuffer *Timer
	Errors       *Counter
	LockLost     *Counter
}

Streamer contains metrics related to event streamer

func NewStreamerMetrics

func NewStreamerMetrics(tags map[string]string) *Streamer

NewStreamerMetrics initializes and returns a Streamer metrics object

type TallyConfiguration

type TallyConfiguration struct {
	Address  string
	Interval time.Duration
}

TallyConfiguration ...

type Timer

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

Timer is a wrapper around metrics.Timer

func TimerInit

func TimerInit(s scope, name string) *Timer

TimerInit is a constructor for Timer

func (*Timer) Record

func (t *Timer) Record(v time.Duration)

Record sets the value of the timer to a specific value

func (*Timer) Start

func (t *Timer) Start() *Timer

Start starts the timer

func (*Timer) Stop

func (t *Timer) Stop()

Stop stops the timer

type Validation

type Validation struct {
	NumValidations           *ProcessCounter
	ValidationRowsProcessed  *Counter
	ValidatedInsertEvents    *Counter
	ValidatedDeleteEvents    *Counter
	ValidatedSchemaEvents    *Counter
	ValidationFailed         *Counter
	ValidationSuccess        *Counter
	ValidationSuccessBatch   *Counter
	ValidationSchemaErrors   *Counter
	ValidationEventTypeError *Counter
	SnapshotBase             *Snapshot
	SnapshotRef              *Snapshot
}

Validation contains metrics related to validation

func NewValidationMetrics

func NewValidationMetrics(tags map[string]string) *Validation

NewValidationMetrics initializes and returns a Validation metrics object

Jump to

Keyboard shortcuts

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