func NewValidationMetrics(tags map[string]string) *Validation {
	s := getGlobal().Tagged(tags)
	return &Validation{
		NumValidations:           ProcessCounterInit(s, "num_validations"),
		ValidationRowsProcessed:  CounterInit(s, "validation_rows_processed"),
		ValidatedInsertEvents:    CounterInit(s, "validated_insert_events"),
		ValidatedDeleteEvents:    CounterInit(s, "validated_delete_events"),
		ValidatedSchemaEvents:    CounterInit(s, "validated_schema_events"),
		ValidationFailed:         CounterInit(s, "validation_failed"),
		ValidationSuccess:        CounterInit(s, "validation_success"),
		ValidationSuccessBatch:   CounterInit(s, "validation_success_batch"),
		ValidationEventTypeError: CounterInit(s, "validation_event_type_errors"),
		SnapshotBase:             NewSnapshotMetrics("validation_", tags),
		SnapshotRef:              NewSnapshotMetrics("validation_", tags),
	}
}
NewValidationMetrics initializes and returns a Validation metrics object
package metrics
import "time"
type counter interface {
	Update(value int64)
}
type timer interface {
	Start()
	Stop()
	Record(time.Duration)
}
type scope interface {
	InitCounter(name string) counter
	InitTimer(name string) timer
	SubScope(name string) scope
	Tagged(tags map[string]string) scope
}
type metricsConstructor func() (scope, error)
var metricsInit metricsConstructor = noopMetricsInit
var _ metricsConstructor = tallyMetricsInit
var IdleWorkers *ProcessCounter
type State struct {
	NumTablesRegistered *Counter
	Sync         *ProcessCounter
	SyncDuration *Timer
	TableReg         *ProcessCounter
	TableRegDuration *Timer
	TableDereg         *ProcessCounter
	TableDeregDuration *Timer
	SyncErrors *Counter
}
type Events struct {
	NumWorkers    *ProcessCounter
	EventsRead    *Counter
	EventsWritten *Counter
	BytesRead     *Counter
	BytesWritten  *Counter
	BatchSize     *Timer
	ReadLatency    *Timer
	ProduceLatency *Timer
}
type Snapshot struct {
	Events
	Errors      *Counter
	Duration    *Timer
	SizeRead    *Counter
	SizeWritten *Counter
	ThrottledUs *Counter
}
type Streamer struct {
	Events
	TimeInBuffer *Timer
	Errors       *Counter
	LockLost     *Counter
}
type ChangelogReader struct {
	Events
	ChangelogRowEventsWritten   *Counter
	ChangelogAlterTableEvents   *Counter
	ChangelogQueryEventsWritten *Counter
	ChangelogUnhandledEvents    *Counter
	TimeToEncounter *Timer
	NumTablesIngesting *Counter
	Errors *Counter
	LockLost *Counter
}
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
}
type FilePipeMetrics struct {
	BytesWritten *Counter
	BytesRead    *Counter
	FilesCreated *Counter
	FilesOpened  *Counter
	FilesClosed  *Counter  
}
func getEventsMetrics(s scope, process string) Events {
	return Events{
		NumWorkers:     ProcessCounterInit(s, "num_"+process+"_workers"),
		EventsRead:     CounterInit(s, process+"_events_read"),
		EventsWritten:  CounterInit(s, process+"_events_written"),
		BytesRead:      CounterInit(s, process+"_bytes_read"),
		BytesWritten:   CounterInit(s, process+"_bytes_written"),
		BatchSize:      TimerInit(s, process+"_batch_size"),
		ReadLatency:    TimerInit(s, process+"_read_latency"),
		ProduceLatency: TimerInit(s, process+"_produce_latency"),
	}
}
func NewStateMetrics() *State {
	s := getGlobal()
	return &State{
		NumTablesRegistered: CounterInit(s, "num_tables_registered"),
		Sync:         ProcessCounterInit(s, "state_sync"),
		SyncDuration: TimerInit(s, "state_sync_duration"),
		TableReg:         ProcessCounterInit(s, "state_sync_table_reg"),
		TableRegDuration: TimerInit(s, "state_sync_table_reg_duration"),
		TableDereg:         ProcessCounterInit(s, "state_sync_table_dereg"),
		TableDeregDuration: TimerInit(s, "state_sync_table_dereg_duration"),
		SyncErrors: CounterInit(s, "state_sync_errors"),
	}
}
func NewChangelogReaderMetrics(tags map[string]string) *ChangelogReader {
	s := getGlobal().Tagged(tags)
	return &ChangelogReader{
		Events: getEventsMetrics(s, "changelog"),
		ChangelogRowEventsWritten:   CounterInit(s, "changelog_row_events_written"),
		ChangelogQueryEventsWritten: CounterInit(s, "changelog_query_events_written"),
		ChangelogUnhandledEvents:    CounterInit(s, "changelog_unhandled_events"),
		TimeToEncounter:             TimerInit(s, "time_to_encounter"),
		NumTablesIngesting:          CounterInit(s, "num_tables_ingesting"),
		Errors:                      CounterInit(s, "changelog_error"),
		ChangelogAlterTableEvents:   CounterInit(s, "changelog_alter_table_events"),
		LockLost:                    CounterInit(s, "changelog_lock_lost"),
	}
}
func NewStreamerMetrics(tags map[string]string) *Streamer {
	s := getGlobal().Tagged(tags)
	return &Streamer{
		Events:       getEventsMetrics(s, "streamer"),
		TimeInBuffer: TimerInit(s, "time_in_buffer"),
		Errors:       CounterInit(s, "streamer_error"),
		LockLost:     CounterInit(s, "streamer_lock_lost"),
	}
}
func NewSnapshotMetrics(prefix string, tags map[string]string) *Snapshot {
	s := getGlobal().Tagged(tags)
	return &Snapshot{
		Events:      getEventsMetrics(s, prefix+"snapshot"),
		Errors:      CounterInit(s, prefix+"snapshot_error"),
		Duration:    TimerInit(s, prefix+"snapshot_duration"),
		SizeRead:    CounterInit(s, prefix+"snapshot_size_read"),
		SizeWritten: CounterInit(s, prefix+"snapshot_size_written"),
		ThrottledUs: CounterInit(s, prefix+"snapshot_throttled_us"),
	}
}