metadata

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

A is an alias for Attributes.

View Source
var AttributeBufferPoolOperations = struct {
	ReadAheadRnd     string
	ReadAhead        string
	ReadAheadEvicted string
	ReadRequests     string
	Reads            string
	WaitFree         string
	WriteRequests    string
}{
	"read_ahead_rnd",
	"read_ahead",
	"read_ahead_evicted",
	"read_requests",
	"reads",
	"wait_free",
	"write_requests",
}

AttributeBufferPoolOperations are the possible values that the attribute "buffer_pool_operations" can have.

View Source
var AttributeBufferPoolPages = struct {
	Data    string
	Dirty   string
	Flushed string
	Free    string
	Misc    string
	Total   string
}{
	"data",
	"dirty",
	"flushed",
	"free",
	"misc",
	"total",
}

AttributeBufferPoolPages are the possible values that the attribute "buffer_pool_pages" can have.

View Source
var AttributeBufferPoolSize = struct {
	Data  string
	Dirty string
	Total string
}{
	"data",
	"dirty",
	"total",
}

AttributeBufferPoolSize are the possible values that the attribute "buffer_pool_size" can have.

View Source
var AttributeCommand = struct {
	Execute      string
	Close        string
	Fetch        string
	Prepare      string
	Reset        string
	SendLongData string
}{
	"execute",
	"close",
	"fetch",
	"prepare",
	"reset",
	"send_long_data",
}

AttributeCommand are the possible values that the attribute "command" can have.

View Source
var AttributeDoubleWrites = struct {
	PagesWritten string
	Writes       string
}{
	"pages_written",
	"writes",
}

AttributeDoubleWrites are the possible values that the attribute "double_writes" can have.

View Source
var AttributeHandler = struct {
	Commit            string
	Delete            string
	Discover          string
	ExternalLock      string
	MrrInit           string
	Prepare           string
	ReadFirst         string
	ReadKey           string
	ReadLast          string
	ReadNext          string
	ReadPrev          string
	ReadRnd           string
	ReadRndNext       string
	Rollback          string
	Savepoint         string
	SavepointRollback string
	Update            string
	Write             string
}{
	"commit",
	"delete",
	"discover",
	"external_lock",
	"mrr_init",
	"prepare",
	"read_first",
	"read_key",
	"read_last",
	"read_next",
	"read_prev",
	"read_rnd",
	"read_rnd_next",
	"rollback",
	"savepoint",
	"savepoint_rollback",
	"update",
	"write",
}

AttributeHandler are the possible values that the attribute "handler" can have.

View Source
var AttributeLocks = struct {
	Immediate string
	Waited    string
}{
	"immediate",
	"waited",
}

AttributeLocks are the possible values that the attribute "locks" can have.

View Source
var AttributeLogOperations = struct {
	Waits         string
	WriteRequests string
	Writes        string
}{
	"waits",
	"write_requests",
	"writes",
}

AttributeLogOperations are the possible values that the attribute "log_operations" can have.

View Source
var AttributeOperations = struct {
	Fsyncs string
	Reads  string
	Writes string
}{
	"fsyncs",
	"reads",
	"writes",
}

AttributeOperations are the possible values that the attribute "operations" can have.

View Source
var AttributePageOperations = struct {
	Created string
	Read    string
	Written string
}{
	"created",
	"read",
	"written",
}

AttributePageOperations are the possible values that the attribute "page_operations" can have.

View Source
var AttributeRowLocks = struct {
	Waits string
	Time  string
}{
	"waits",
	"time",
}

AttributeRowLocks are the possible values that the attribute "row_locks" can have.

View Source
var AttributeRowOperations = struct {
	Deleted  string
	Inserted string
	Read     string
	Updated  string
}{
	"deleted",
	"inserted",
	"read",
	"updated",
}

AttributeRowOperations are the possible values that the attribute "row_operations" can have.

View Source
var AttributeSorts = struct {
	MergePasses string
	Range       string
	Rows        string
	Scan        string
}{
	"merge_passes",
	"range",
	"rows",
	"scan",
}

AttributeSorts are the possible values that the attribute "sorts" can have.

View Source
var AttributeThreads = struct {
	Cached    string
	Connected string
	Created   string
	Running   string
}{
	"cached",
	"connected",
	"created",
	"running",
}

AttributeThreads are the possible values that the attribute "threads" can have.

View Source
var Attributes = struct {
	// BufferPoolOperations (The buffer pool operations types.)
	BufferPoolOperations string
	// BufferPoolPages (The buffer pool pages types.)
	BufferPoolPages string
	// BufferPoolSize (The buffer pool size types.)
	BufferPoolSize string
	// Command (The command types.)
	Command string
	// DoubleWrites (The doublewrite types.)
	DoubleWrites string
	// Handler (The handler types.)
	Handler string
	// Locks (The table locks type.)
	Locks string
	// LogOperations (The log operation types.)
	LogOperations string
	// Operations (The operation types.)
	Operations string
	// PageOperations (The page operation types.)
	PageOperations string
	// RowLocks (The row lock type.)
	RowLocks string
	// RowOperations (The row operation type.)
	RowOperations string
	// Sorts (The sort count type.)
	Sorts string
	// Threads (The thread count type.)
	Threads string
}{
	"operation",
	"kind",
	"kind",
	"command",
	"kind",
	"kind",
	"kind",
	"operation",
	"operation",
	"operation",
	"kind",
	"operation",
	"kind",
	"kind",
}

Attributes contains the possible metric attributes that can be used.

Functions

func WithStartTime added in v0.44.0

func WithStartTime(startTime pdata.Timestamp) metricBuilderOption

WithStartTime sets startTime on the metrics builder.

Types

type MetricSettings added in v0.44.0

type MetricSettings struct {
	Enabled bool `mapstructure:"enabled"`
}

MetricSettings provides common settings for a particular metric.

type MetricsBuilder added in v0.44.0

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

MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations required to produce metric representation defined in metadata and user settings.

func NewMetricsBuilder added in v0.44.0

func NewMetricsBuilder(settings MetricsSettings, options ...metricBuilderOption) *MetricsBuilder

func (*MetricsBuilder) Emit added in v0.44.0

func (mb *MetricsBuilder) Emit(metrics pdata.MetricSlice)

Emit appends generated metrics to a pdata.MetricsSlice and updates the internal state to be ready for recording another set of data points. This function will be doing all transformations required to produce metric representation defined in metadata and user settings, e.g. delta/cumulative translation.

func (*MetricsBuilder) RecordMysqlBufferPoolOperationsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlBufferPoolOperationsDataPoint(ts pdata.Timestamp, val int64, bufferPoolOperationsAttributeValue string)

RecordMysqlBufferPoolOperationsDataPoint adds a data point to mysql.buffer_pool_operations metric.

func (*MetricsBuilder) RecordMysqlBufferPoolPagesDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlBufferPoolPagesDataPoint(ts pdata.Timestamp, val float64, bufferPoolPagesAttributeValue string)

RecordMysqlBufferPoolPagesDataPoint adds a data point to mysql.buffer_pool_pages metric.

func (*MetricsBuilder) RecordMysqlBufferPoolSizeDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlBufferPoolSizeDataPoint(ts pdata.Timestamp, val float64, bufferPoolSizeAttributeValue string)

RecordMysqlBufferPoolSizeDataPoint adds a data point to mysql.buffer_pool_size metric.

func (*MetricsBuilder) RecordMysqlCommandsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlCommandsDataPoint(ts pdata.Timestamp, val int64, commandAttributeValue string)

RecordMysqlCommandsDataPoint adds a data point to mysql.commands metric.

func (*MetricsBuilder) RecordMysqlDoubleWritesDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlDoubleWritesDataPoint(ts pdata.Timestamp, val int64, doubleWritesAttributeValue string)

RecordMysqlDoubleWritesDataPoint adds a data point to mysql.double_writes metric.

func (*MetricsBuilder) RecordMysqlHandlersDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlHandlersDataPoint(ts pdata.Timestamp, val int64, handlerAttributeValue string)

RecordMysqlHandlersDataPoint adds a data point to mysql.handlers metric.

func (*MetricsBuilder) RecordMysqlLocksDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlLocksDataPoint(ts pdata.Timestamp, val int64, locksAttributeValue string)

RecordMysqlLocksDataPoint adds a data point to mysql.locks metric.

func (*MetricsBuilder) RecordMysqlLogOperationsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlLogOperationsDataPoint(ts pdata.Timestamp, val int64, logOperationsAttributeValue string)

RecordMysqlLogOperationsDataPoint adds a data point to mysql.log_operations metric.

func (*MetricsBuilder) RecordMysqlOperationsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlOperationsDataPoint(ts pdata.Timestamp, val int64, operationsAttributeValue string)

RecordMysqlOperationsDataPoint adds a data point to mysql.operations metric.

func (*MetricsBuilder) RecordMysqlPageOperationsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlPageOperationsDataPoint(ts pdata.Timestamp, val int64, pageOperationsAttributeValue string)

RecordMysqlPageOperationsDataPoint adds a data point to mysql.page_operations metric.

func (*MetricsBuilder) RecordMysqlRowLocksDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlRowLocksDataPoint(ts pdata.Timestamp, val int64, rowLocksAttributeValue string)

RecordMysqlRowLocksDataPoint adds a data point to mysql.row_locks metric.

func (*MetricsBuilder) RecordMysqlRowOperationsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlRowOperationsDataPoint(ts pdata.Timestamp, val int64, rowOperationsAttributeValue string)

RecordMysqlRowOperationsDataPoint adds a data point to mysql.row_operations metric.

func (*MetricsBuilder) RecordMysqlSortsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlSortsDataPoint(ts pdata.Timestamp, val int64, sortsAttributeValue string)

RecordMysqlSortsDataPoint adds a data point to mysql.sorts metric.

func (*MetricsBuilder) RecordMysqlThreadsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordMysqlThreadsDataPoint(ts pdata.Timestamp, val float64, threadsAttributeValue string)

RecordMysqlThreadsDataPoint adds a data point to mysql.threads metric.

func (*MetricsBuilder) Reset added in v0.44.0

func (mb *MetricsBuilder) Reset(options ...metricBuilderOption)

Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, and metrics builder should update its startTime and reset it's internal state accordingly.

type MetricsSettings added in v0.44.0

type MetricsSettings struct {
	MysqlBufferPoolOperations MetricSettings `mapstructure:"mysql.buffer_pool_operations"`
	MysqlBufferPoolPages      MetricSettings `mapstructure:"mysql.buffer_pool_pages"`
	MysqlBufferPoolSize       MetricSettings `mapstructure:"mysql.buffer_pool_size"`
	MysqlCommands             MetricSettings `mapstructure:"mysql.commands"`
	MysqlDoubleWrites         MetricSettings `mapstructure:"mysql.double_writes"`
	MysqlHandlers             MetricSettings `mapstructure:"mysql.handlers"`
	MysqlLocks                MetricSettings `mapstructure:"mysql.locks"`
	MysqlLogOperations        MetricSettings `mapstructure:"mysql.log_operations"`
	MysqlOperations           MetricSettings `mapstructure:"mysql.operations"`
	MysqlPageOperations       MetricSettings `mapstructure:"mysql.page_operations"`
	MysqlRowLocks             MetricSettings `mapstructure:"mysql.row_locks"`
	MysqlRowOperations        MetricSettings `mapstructure:"mysql.row_operations"`
	MysqlSorts                MetricSettings `mapstructure:"mysql.sorts"`
	MysqlThreads              MetricSettings `mapstructure:"mysql.threads"`
}

MetricsSettings provides settings for mysqlreceiver metrics.

func DefaultMetricsSettings added in v0.44.0

func DefaultMetricsSettings() MetricsSettings

Jump to

Keyboard shortcuts

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