fetchmetrics

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Namespace = "molt"
	Subsystem = "fetch"
)

Variables

View Source
var (
	// Counts of entities in the fetch runs.
	NumTablesProcessed = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "num_tables",
		Help:      "Number of tables migrated.",
	})
	ImportedRows = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "rows_imported",
		Help:      "Number of rows that have been imported by table.",
	}, []string{"table"})
	ExportedRows = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "rows_exported",
		Help:      "Number of rows that have been exported by table.",
	}, []string{"table"})

	// Data errors are ones relating to individual rows or files processed
	// for the import or copy.
	// TODO: still need to integrate data errors when we do exceptions logging.
	NumDataErrors = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "num_data_errors",
		Help:      "Number of data level errors by table.",
	}, []string{"table"})
	NumTaskErrors = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "num_task_errors",
		Help:      "Number of task errors.",
	})

	// Progress and duration metrics.
	CompletionPercentage = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "completion_percent",
		Help:      "Completion percent by table.",
	}, []string{"table"})

	TableExportDuration = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "table_export_duration_ms",
		Help:      "Duration (in milliseconds) for a particular table's export",
	}, []string{"table"})
	TableImportDuration = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "table_import_duration_ms",
		Help:      "Duration (in milliseconds) for a particular table's import",
	}, []string{"table"})
	TableOverallDuration = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "table_overall_duration_ms",
		Help:      "Duration (in milliseconds) for a particular table's fetch.",
	}, []string{"table"})
	OverallDuration = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: Namespace,
		Subsystem: Subsystem,
		Name:      "overall_duration",
		Help:      "Duration (in seconds) for the overall fetch",
	})
)

Just a note that these metrics are most useful in reporting progress for each table/schema combination. However, we do need to be mindful that there could be cardinality explosion for metrics if there are many table + schema combinations.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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