Documentation ¶
Index ¶
- Constants
- Variables
- type AttributeBufferPoolData
- type AttributeBufferPoolOperations
- type AttributeBufferPoolPages
- type AttributeCacheStatus
- type AttributeCommand
- type AttributeConnectionError
- type AttributeConnectionStatus
- type AttributeDirection
- type AttributeDoubleWrites
- type AttributeEventState
- type AttributeHandler
- type AttributeIoWaitsOperations
- type AttributeJoinKind
- type AttributeLocks
- type AttributeLogOperations
- type AttributeMysqlxThreads
- type AttributeOpenedResources
- type AttributeOperations
- type AttributePageOperations
- type AttributePreparedStatementsCommand
- type AttributeReadLockType
- type AttributeRowLocks
- type AttributeRowOperations
- type AttributeSorts
- type AttributeTableSizeType
- type AttributeThreads
- type AttributeTmpResource
- type AttributeWriteLockType
- type MetricBuilderOption
- type MetricConfig
- type MetricsBuilder
- func (mb *MetricsBuilder) Emit(options ...ResourceMetricsOption) pmetric.Metrics
- func (mb *MetricsBuilder) EmitForResource(options ...ResourceMetricsOption)
- func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder
- func (mb *MetricsBuilder) RecordMysqlBufferPoolDataPagesDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordMysqlBufferPoolLimitDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordMysqlBufferPoolOperationsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlBufferPoolPageFlushesDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordMysqlBufferPoolPagesDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlBufferPoolUsageDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordMysqlClientNetworkIoDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlCommandsDataPoint(ts pcommon.Timestamp, inputVal string, commandAttributeValue AttributeCommand) error
- func (mb *MetricsBuilder) RecordMysqlConnectionCountDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordMysqlConnectionErrorsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlDoubleWritesDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlHandlersDataPoint(ts pcommon.Timestamp, inputVal string, handlerAttributeValue AttributeHandler) error
- func (mb *MetricsBuilder) RecordMysqlIndexIoWaitCountDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordMysqlIndexIoWaitTimeDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordMysqlJoinsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlLocksDataPoint(ts pcommon.Timestamp, inputVal string, locksAttributeValue AttributeLocks) error
- func (mb *MetricsBuilder) RecordMysqlLogOperationsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlMysqlxConnectionsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlMysqlxWorkerThreadsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlOpenedResourcesDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlOperationsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlPageOperationsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlPreparedStatementsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlQueryClientCountDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordMysqlQueryCountDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordMysqlQuerySlowCountDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordMysqlReplicaSQLDelayDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordMysqlReplicaTimeBehindSourceDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordMysqlRowLocksDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlRowOperationsDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlSortsDataPoint(ts pcommon.Timestamp, inputVal string, sortsAttributeValue AttributeSorts) error
- func (mb *MetricsBuilder) RecordMysqlStatementEventCountDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlStatementEventWaitTimeDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableAverageRowLengthDataPoint(ts pcommon.Timestamp, val int64, tableNameAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableIoWaitCountDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordMysqlTableIoWaitTimeDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordMysqlTableLockWaitReadCountDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableLockWaitReadTimeDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableLockWaitWriteCountDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableLockWaitWriteTimeDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableOpenCacheDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlTableRowsDataPoint(ts pcommon.Timestamp, val int64, tableNameAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlTableSizeDataPoint(ts pcommon.Timestamp, val int64, tableNameAttributeValue string, ...)
- func (mb *MetricsBuilder) RecordMysqlThreadsDataPoint(ts pcommon.Timestamp, inputVal string, threadsAttributeValue AttributeThreads) error
- func (mb *MetricsBuilder) RecordMysqlTmpResourcesDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordMysqlUptimeDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) Reset(options ...MetricBuilderOption)
- type MetricsBuilderConfig
- type MetricsConfig
- type ResourceAttributeConfig
- type ResourceAttributesConfig
- type ResourceBuilder
- type ResourceMetricsOption
Constants ¶
const (
MetricsStability = component.StabilityLevelBeta
)
Variables ¶
var ( Type = component.MustNewType("mysql") ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver" )
var MapAttributeBufferPoolData = map[string]AttributeBufferPoolData{ "dirty": AttributeBufferPoolDataDirty, "clean": AttributeBufferPoolDataClean, }
MapAttributeBufferPoolData is a helper map of string to AttributeBufferPoolData attribute value.
var MapAttributeBufferPoolOperations = map[string]AttributeBufferPoolOperations{ "read_ahead_rnd": AttributeBufferPoolOperationsReadAheadRnd, "read_ahead": AttributeBufferPoolOperationsReadAhead, "read_ahead_evicted": AttributeBufferPoolOperationsReadAheadEvicted, "read_requests": AttributeBufferPoolOperationsReadRequests, "reads": AttributeBufferPoolOperationsReads, "wait_free": AttributeBufferPoolOperationsWaitFree, "write_requests": AttributeBufferPoolOperationsWriteRequests, }
MapAttributeBufferPoolOperations is a helper map of string to AttributeBufferPoolOperations attribute value.
var MapAttributeBufferPoolPages = map[string]AttributeBufferPoolPages{ "data": AttributeBufferPoolPagesData, "free": AttributeBufferPoolPagesFree, "misc": AttributeBufferPoolPagesMisc, }
MapAttributeBufferPoolPages is a helper map of string to AttributeBufferPoolPages attribute value.
var MapAttributeCacheStatus = map[string]AttributeCacheStatus{ "hit": AttributeCacheStatusHit, "miss": AttributeCacheStatusMiss, "overflow": AttributeCacheStatusOverflow, }
MapAttributeCacheStatus is a helper map of string to AttributeCacheStatus attribute value.
var MapAttributeCommand = map[string]AttributeCommand{ "delete": AttributeCommandDelete, "insert": AttributeCommandInsert, "select": AttributeCommandSelect, "update": AttributeCommandUpdate, }
MapAttributeCommand is a helper map of string to AttributeCommand attribute value.
var MapAttributeConnectionError = map[string]AttributeConnectionError{ "accept": AttributeConnectionErrorAccept, "internal": AttributeConnectionErrorInternal, "max_connections": AttributeConnectionErrorMaxConnections, "peer_address": AttributeConnectionErrorPeerAddress, "select": AttributeConnectionErrorSelect, "tcpwrap": AttributeConnectionErrorTcpwrap, "aborted": AttributeConnectionErrorAborted, "aborted_clients": AttributeConnectionErrorAbortedClients, "locked": AttributeConnectionErrorLocked, }
MapAttributeConnectionError is a helper map of string to AttributeConnectionError attribute value.
var MapAttributeConnectionStatus = map[string]AttributeConnectionStatus{ "accepted": AttributeConnectionStatusAccepted, "closed": AttributeConnectionStatusClosed, "rejected": AttributeConnectionStatusRejected, }
MapAttributeConnectionStatus is a helper map of string to AttributeConnectionStatus attribute value.
var MapAttributeDirection = map[string]AttributeDirection{ "received": AttributeDirectionReceived, "sent": AttributeDirectionSent, }
MapAttributeDirection is a helper map of string to AttributeDirection attribute value.
var MapAttributeDoubleWrites = map[string]AttributeDoubleWrites{ "pages_written": AttributeDoubleWritesPagesWritten, "writes": AttributeDoubleWritesWrites, }
MapAttributeDoubleWrites is a helper map of string to AttributeDoubleWrites attribute value.
var MapAttributeEventState = map[string]AttributeEventState{ "errors": AttributeEventStateErrors, "warnings": AttributeEventStateWarnings, "rows_affected": AttributeEventStateRowsAffected, "rows_sent": AttributeEventStateRowsSent, "rows_examined": AttributeEventStateRowsExamined, "created_tmp_disk_tables": AttributeEventStateCreatedTmpDiskTables, "created_tmp_tables": AttributeEventStateCreatedTmpTables, "sort_merge_passes": AttributeEventStateSortMergePasses, "sort_rows": AttributeEventStateSortRows, "no_index_used": AttributeEventStateNoIndexUsed, }
MapAttributeEventState is a helper map of string to AttributeEventState attribute value.
var MapAttributeHandler = map[string]AttributeHandler{ "commit": AttributeHandlerCommit, "delete": AttributeHandlerDelete, "discover": AttributeHandlerDiscover, "external_lock": AttributeHandlerExternalLock, "mrr_init": AttributeHandlerMrrInit, "prepare": AttributeHandlerPrepare, "read_first": AttributeHandlerReadFirst, "read_key": AttributeHandlerReadKey, "read_last": AttributeHandlerReadLast, "read_next": AttributeHandlerReadNext, "read_prev": AttributeHandlerReadPrev, "read_rnd": AttributeHandlerReadRnd, "read_rnd_next": AttributeHandlerReadRndNext, "rollback": AttributeHandlerRollback, "savepoint": AttributeHandlerSavepoint, "savepoint_rollback": AttributeHandlerSavepointRollback, "update": AttributeHandlerUpdate, "write": AttributeHandlerWrite, }
MapAttributeHandler is a helper map of string to AttributeHandler attribute value.
var MapAttributeIoWaitsOperations = map[string]AttributeIoWaitsOperations{ "delete": AttributeIoWaitsOperationsDelete, "fetch": AttributeIoWaitsOperationsFetch, "insert": AttributeIoWaitsOperationsInsert, "update": AttributeIoWaitsOperationsUpdate, }
MapAttributeIoWaitsOperations is a helper map of string to AttributeIoWaitsOperations attribute value.
var MapAttributeJoinKind = map[string]AttributeJoinKind{ "full": AttributeJoinKindFull, "full_range": AttributeJoinKindFullRange, "range": AttributeJoinKindRange, "range_check": AttributeJoinKindRangeCheck, "scan": AttributeJoinKindScan, }
MapAttributeJoinKind is a helper map of string to AttributeJoinKind attribute value.
var MapAttributeLocks = map[string]AttributeLocks{ "immediate": AttributeLocksImmediate, "waited": AttributeLocksWaited, }
MapAttributeLocks is a helper map of string to AttributeLocks attribute value.
var MapAttributeLogOperations = map[string]AttributeLogOperations{ "waits": AttributeLogOperationsWaits, "write_requests": AttributeLogOperationsWriteRequests, "writes": AttributeLogOperationsWrites, }
MapAttributeLogOperations is a helper map of string to AttributeLogOperations attribute value.
var MapAttributeMysqlxThreads = map[string]AttributeMysqlxThreads{ "available": AttributeMysqlxThreadsAvailable, "active": AttributeMysqlxThreadsActive, }
MapAttributeMysqlxThreads is a helper map of string to AttributeMysqlxThreads attribute value.
var MapAttributeOpenedResources = map[string]AttributeOpenedResources{ "file": AttributeOpenedResourcesFile, "table_definition": AttributeOpenedResourcesTableDefinition, "table": AttributeOpenedResourcesTable, }
MapAttributeOpenedResources is a helper map of string to AttributeOpenedResources attribute value.
var MapAttributeOperations = map[string]AttributeOperations{ "fsyncs": AttributeOperationsFsyncs, "reads": AttributeOperationsReads, "writes": AttributeOperationsWrites, }
MapAttributeOperations is a helper map of string to AttributeOperations attribute value.
var MapAttributePageOperations = map[string]AttributePageOperations{ "created": AttributePageOperationsCreated, "read": AttributePageOperationsRead, "written": AttributePageOperationsWritten, }
MapAttributePageOperations is a helper map of string to AttributePageOperations attribute value.
var MapAttributePreparedStatementsCommand = map[string]AttributePreparedStatementsCommand{ "execute": AttributePreparedStatementsCommandExecute, "close": AttributePreparedStatementsCommandClose, "fetch": AttributePreparedStatementsCommandFetch, "prepare": AttributePreparedStatementsCommandPrepare, "reset": AttributePreparedStatementsCommandReset, "send_long_data": AttributePreparedStatementsCommandSendLongData, }
MapAttributePreparedStatementsCommand is a helper map of string to AttributePreparedStatementsCommand attribute value.
var MapAttributeReadLockType = map[string]AttributeReadLockType{ "normal": AttributeReadLockTypeNormal, "with_shared_locks": AttributeReadLockTypeWithSharedLocks, "high_priority": AttributeReadLockTypeHighPriority, "no_insert": AttributeReadLockTypeNoInsert, "external": AttributeReadLockTypeExternal, }
MapAttributeReadLockType is a helper map of string to AttributeReadLockType attribute value.
var MapAttributeRowLocks = map[string]AttributeRowLocks{ "waits": AttributeRowLocksWaits, "time": AttributeRowLocksTime, }
MapAttributeRowLocks is a helper map of string to AttributeRowLocks attribute value.
var MapAttributeRowOperations = map[string]AttributeRowOperations{ "deleted": AttributeRowOperationsDeleted, "inserted": AttributeRowOperationsInserted, "read": AttributeRowOperationsRead, "updated": AttributeRowOperationsUpdated, }
MapAttributeRowOperations is a helper map of string to AttributeRowOperations attribute value.
var MapAttributeSorts = map[string]AttributeSorts{ "merge_passes": AttributeSortsMergePasses, "range": AttributeSortsRange, "rows": AttributeSortsRows, "scan": AttributeSortsScan, }
MapAttributeSorts is a helper map of string to AttributeSorts attribute value.
var MapAttributeTableSizeType = map[string]AttributeTableSizeType{ "data": AttributeTableSizeTypeData, "index": AttributeTableSizeTypeIndex, }
MapAttributeTableSizeType is a helper map of string to AttributeTableSizeType attribute value.
var MapAttributeThreads = map[string]AttributeThreads{ "cached": AttributeThreadsCached, "connected": AttributeThreadsConnected, "created": AttributeThreadsCreated, "running": AttributeThreadsRunning, }
MapAttributeThreads is a helper map of string to AttributeThreads attribute value.
var MapAttributeTmpResource = map[string]AttributeTmpResource{ "disk_tables": AttributeTmpResourceDiskTables, "files": AttributeTmpResourceFiles, "tables": AttributeTmpResourceTables, }
MapAttributeTmpResource is a helper map of string to AttributeTmpResource attribute value.
var MapAttributeWriteLockType = map[string]AttributeWriteLockType{ "allow_write": AttributeWriteLockTypeAllowWrite, "concurrent_insert": AttributeWriteLockTypeConcurrentInsert, "low_priority": AttributeWriteLockTypeLowPriority, "normal": AttributeWriteLockTypeNormal, "external": AttributeWriteLockTypeExternal, }
MapAttributeWriteLockType is a helper map of string to AttributeWriteLockType attribute value.
Functions ¶
This section is empty.
Types ¶
type AttributeBufferPoolData ¶ added in v0.46.0
type AttributeBufferPoolData int
AttributeBufferPoolData specifies the a value buffer_pool_data attribute.
const ( AttributeBufferPoolDataDirty AttributeBufferPoolData AttributeBufferPoolDataClean )
func (AttributeBufferPoolData) String ¶ added in v0.51.0
func (av AttributeBufferPoolData) String() string
String returns the string representation of the AttributeBufferPoolData.
type AttributeBufferPoolOperations ¶ added in v0.39.0
type AttributeBufferPoolOperations int
AttributeBufferPoolOperations specifies the a value buffer_pool_operations attribute.
const ( AttributeBufferPoolOperationsReadAheadRnd AttributeBufferPoolOperations AttributeBufferPoolOperationsReadAhead AttributeBufferPoolOperationsReadAheadEvicted AttributeBufferPoolOperationsReadRequests AttributeBufferPoolOperationsReads AttributeBufferPoolOperationsWaitFree AttributeBufferPoolOperationsWriteRequests )
func (AttributeBufferPoolOperations) String ¶ added in v0.51.0
func (av AttributeBufferPoolOperations) String() string
String returns the string representation of the AttributeBufferPoolOperations.
type AttributeBufferPoolPages ¶ added in v0.39.0
type AttributeBufferPoolPages int
AttributeBufferPoolPages specifies the a value buffer_pool_pages attribute.
const ( AttributeBufferPoolPagesData AttributeBufferPoolPages AttributeBufferPoolPagesFree AttributeBufferPoolPagesMisc )
func (AttributeBufferPoolPages) String ¶ added in v0.51.0
func (av AttributeBufferPoolPages) String() string
String returns the string representation of the AttributeBufferPoolPages.
type AttributeCacheStatus ¶ added in v0.64.0
type AttributeCacheStatus int
AttributeCacheStatus specifies the a value cache_status attribute.
const ( AttributeCacheStatusHit AttributeCacheStatus AttributeCacheStatusMiss AttributeCacheStatusOverflow )
func (AttributeCacheStatus) String ¶ added in v0.64.0
func (av AttributeCacheStatus) String() string
String returns the string representation of the AttributeCacheStatus.
type AttributeCommand ¶ added in v0.39.0
type AttributeCommand int
AttributeCommand specifies the a value command attribute.
const ( AttributeCommandDelete AttributeCommand AttributeCommandInsert AttributeCommandSelect AttributeCommandUpdate )
func (AttributeCommand) String ¶ added in v0.51.0
func (av AttributeCommand) String() string
String returns the string representation of the AttributeCommand.
type AttributeConnectionError ¶ added in v0.64.0
type AttributeConnectionError int
AttributeConnectionError specifies the a value connection_error attribute.
const ( AttributeConnectionErrorAccept AttributeConnectionError AttributeConnectionErrorInternal AttributeConnectionErrorMaxConnections AttributeConnectionErrorPeerAddress AttributeConnectionErrorSelect AttributeConnectionErrorTcpwrap AttributeConnectionErrorAborted AttributeConnectionErrorAbortedClients AttributeConnectionErrorLocked )
func (AttributeConnectionError) String ¶ added in v0.64.0
func (av AttributeConnectionError) String() string
String returns the string representation of the AttributeConnectionError.
type AttributeConnectionStatus ¶ added in v0.64.0
type AttributeConnectionStatus int
AttributeConnectionStatus specifies the a value connection_status attribute.
const ( AttributeConnectionStatusAccepted AttributeConnectionStatus AttributeConnectionStatusClosed AttributeConnectionStatusRejected )
func (AttributeConnectionStatus) String ¶ added in v0.64.0
func (av AttributeConnectionStatus) String() string
String returns the string representation of the AttributeConnectionStatus.
type AttributeDirection ¶ added in v0.64.0
type AttributeDirection int
AttributeDirection specifies the a value direction attribute.
const ( AttributeDirectionReceived AttributeDirection AttributeDirectionSent )
func (AttributeDirection) String ¶ added in v0.64.0
func (av AttributeDirection) String() string
String returns the string representation of the AttributeDirection.
type AttributeDoubleWrites ¶ added in v0.39.0
type AttributeDoubleWrites int
AttributeDoubleWrites specifies the a value double_writes attribute.
const ( AttributeDoubleWritesPagesWritten AttributeDoubleWrites AttributeDoubleWritesWrites )
func (AttributeDoubleWrites) String ¶ added in v0.51.0
func (av AttributeDoubleWrites) String() string
String returns the string representation of the AttributeDoubleWrites.
type AttributeEventState ¶ added in v0.63.0
type AttributeEventState int
AttributeEventState specifies the a value event_state attribute.
const ( AttributeEventStateErrors AttributeEventState AttributeEventStateWarnings AttributeEventStateRowsAffected AttributeEventStateRowsSent AttributeEventStateRowsExamined AttributeEventStateCreatedTmpDiskTables AttributeEventStateCreatedTmpTables AttributeEventStateSortMergePasses AttributeEventStateSortRows AttributeEventStateNoIndexUsed )
func (AttributeEventState) String ¶ added in v0.63.0
func (av AttributeEventState) String() string
String returns the string representation of the AttributeEventState.
type AttributeHandler ¶ added in v0.39.0
type AttributeHandler int
AttributeHandler specifies the a value handler attribute.
const ( AttributeHandlerCommit AttributeHandler AttributeHandlerDelete AttributeHandlerDiscover AttributeHandlerExternalLock AttributeHandlerMrrInit AttributeHandlerPrepare AttributeHandlerReadFirst AttributeHandlerReadKey AttributeHandlerReadLast AttributeHandlerReadNext AttributeHandlerReadPrev AttributeHandlerReadRnd AttributeHandlerReadRndNext AttributeHandlerRollback AttributeHandlerSavepoint AttributeHandlerSavepointRollback AttributeHandlerUpdate AttributeHandlerWrite )
func (AttributeHandler) String ¶ added in v0.51.0
func (av AttributeHandler) String() string
String returns the string representation of the AttributeHandler.
type AttributeIoWaitsOperations ¶ added in v0.61.0
type AttributeIoWaitsOperations int
AttributeIoWaitsOperations specifies the a value io_waits_operations attribute.
const ( AttributeIoWaitsOperationsDelete AttributeIoWaitsOperations AttributeIoWaitsOperationsFetch AttributeIoWaitsOperationsInsert AttributeIoWaitsOperationsUpdate )
func (AttributeIoWaitsOperations) String ¶ added in v0.61.0
func (av AttributeIoWaitsOperations) String() string
String returns the string representation of the AttributeIoWaitsOperations.
type AttributeJoinKind ¶ added in v0.64.0
type AttributeJoinKind int
AttributeJoinKind specifies the a value join_kind attribute.
const ( AttributeJoinKindFull AttributeJoinKind AttributeJoinKindFullRange AttributeJoinKindRange AttributeJoinKindRangeCheck AttributeJoinKindScan )
func (AttributeJoinKind) String ¶ added in v0.64.0
func (av AttributeJoinKind) String() string
String returns the string representation of the AttributeJoinKind.
type AttributeLocks ¶ added in v0.39.0
type AttributeLocks int
AttributeLocks specifies the a value locks attribute.
const ( AttributeLocksImmediate AttributeLocks AttributeLocksWaited )
func (AttributeLocks) String ¶ added in v0.51.0
func (av AttributeLocks) String() string
String returns the string representation of the AttributeLocks.
type AttributeLogOperations ¶ added in v0.39.0
type AttributeLogOperations int
AttributeLogOperations specifies the a value log_operations attribute.
const ( AttributeLogOperationsWaits AttributeLogOperations AttributeLogOperationsWriteRequests AttributeLogOperationsWrites )
func (AttributeLogOperations) String ¶ added in v0.51.0
func (av AttributeLogOperations) String() string
String returns the string representation of the AttributeLogOperations.
type AttributeMysqlxThreads ¶ added in v0.63.0
type AttributeMysqlxThreads int
AttributeMysqlxThreads specifies the a value mysqlx_threads attribute.
const ( AttributeMysqlxThreadsAvailable AttributeMysqlxThreads AttributeMysqlxThreadsActive )
func (AttributeMysqlxThreads) String ¶ added in v0.63.0
func (av AttributeMysqlxThreads) String() string
String returns the string representation of the AttributeMysqlxThreads.
type AttributeOpenedResources ¶ added in v0.63.0
type AttributeOpenedResources int
AttributeOpenedResources specifies the a value opened_resources attribute.
const ( AttributeOpenedResourcesFile AttributeOpenedResources AttributeOpenedResourcesTableDefinition AttributeOpenedResourcesTable )
func (AttributeOpenedResources) String ¶ added in v0.63.0
func (av AttributeOpenedResources) String() string
String returns the string representation of the AttributeOpenedResources.
type AttributeOperations ¶ added in v0.39.0
type AttributeOperations int
AttributeOperations specifies the a value operations attribute.
const ( AttributeOperationsFsyncs AttributeOperations AttributeOperationsReads AttributeOperationsWrites )
func (AttributeOperations) String ¶ added in v0.51.0
func (av AttributeOperations) String() string
String returns the string representation of the AttributeOperations.
type AttributePageOperations ¶ added in v0.39.0
type AttributePageOperations int
AttributePageOperations specifies the a value page_operations attribute.
const ( AttributePageOperationsCreated AttributePageOperations AttributePageOperationsRead AttributePageOperationsWritten )
func (AttributePageOperations) String ¶ added in v0.51.0
func (av AttributePageOperations) String() string
String returns the string representation of the AttributePageOperations.
type AttributePreparedStatementsCommand ¶ added in v0.67.0
type AttributePreparedStatementsCommand int
AttributePreparedStatementsCommand specifies the a value prepared_statements_command attribute.
const ( AttributePreparedStatementsCommandExecute AttributePreparedStatementsCommand AttributePreparedStatementsCommandClose AttributePreparedStatementsCommandFetch AttributePreparedStatementsCommandPrepare AttributePreparedStatementsCommandReset AttributePreparedStatementsCommandSendLongData )
func (AttributePreparedStatementsCommand) String ¶ added in v0.67.0
func (av AttributePreparedStatementsCommand) String() string
String returns the string representation of the AttributePreparedStatementsCommand.
type AttributeReadLockType ¶ added in v0.64.0
type AttributeReadLockType int
AttributeReadLockType specifies the a value read_lock_type attribute.
const ( AttributeReadLockTypeNormal AttributeReadLockType AttributeReadLockTypeHighPriority AttributeReadLockTypeNoInsert AttributeReadLockTypeExternal )
func (AttributeReadLockType) String ¶ added in v0.64.0
func (av AttributeReadLockType) String() string
String returns the string representation of the AttributeReadLockType.
type AttributeRowLocks ¶ added in v0.39.0
type AttributeRowLocks int
AttributeRowLocks specifies the a value row_locks attribute.
const ( AttributeRowLocksWaits AttributeRowLocks AttributeRowLocksTime )
func (AttributeRowLocks) String ¶ added in v0.51.0
func (av AttributeRowLocks) String() string
String returns the string representation of the AttributeRowLocks.
type AttributeRowOperations ¶ added in v0.39.0
type AttributeRowOperations int
AttributeRowOperations specifies the a value row_operations attribute.
const ( AttributeRowOperationsDeleted AttributeRowOperations AttributeRowOperationsInserted AttributeRowOperationsRead AttributeRowOperationsUpdated )
func (AttributeRowOperations) String ¶ added in v0.51.0
func (av AttributeRowOperations) String() string
String returns the string representation of the AttributeRowOperations.
type AttributeSorts ¶ added in v0.39.0
type AttributeSorts int
AttributeSorts specifies the a value sorts attribute.
const ( AttributeSortsMergePasses AttributeSorts AttributeSortsRange AttributeSortsRows AttributeSortsScan )
func (AttributeSorts) String ¶ added in v0.51.0
func (av AttributeSorts) String() string
String returns the string representation of the AttributeSorts.
type AttributeTableSizeType ¶ added in v0.101.0
type AttributeTableSizeType int
AttributeTableSizeType specifies the a value table_size_type attribute.
const ( AttributeTableSizeTypeData AttributeTableSizeType AttributeTableSizeTypeIndex )
func (AttributeTableSizeType) String ¶ added in v0.101.0
func (av AttributeTableSizeType) String() string
String returns the string representation of the AttributeTableSizeType.
type AttributeThreads ¶ added in v0.39.0
type AttributeThreads int
AttributeThreads specifies the a value threads attribute.
const ( AttributeThreadsCached AttributeThreads AttributeThreadsConnected AttributeThreadsCreated AttributeThreadsRunning )
func (AttributeThreads) String ¶ added in v0.51.0
func (av AttributeThreads) String() string
String returns the string representation of the AttributeThreads.
type AttributeTmpResource ¶ added in v0.62.0
type AttributeTmpResource int
AttributeTmpResource specifies the a value tmp_resource attribute.
const ( AttributeTmpResourceDiskTables AttributeTmpResource AttributeTmpResourceFiles AttributeTmpResourceTables )
func (AttributeTmpResource) String ¶ added in v0.62.0
func (av AttributeTmpResource) String() string
String returns the string representation of the AttributeTmpResource.
type AttributeWriteLockType ¶ added in v0.64.0
type AttributeWriteLockType int
AttributeWriteLockType specifies the a value write_lock_type attribute.
const ( AttributeWriteLockTypeAllowWrite AttributeWriteLockType AttributeWriteLockTypeConcurrentInsert AttributeWriteLockTypeLowPriority AttributeWriteLockTypeNormal AttributeWriteLockTypeExternal )
func (AttributeWriteLockType) String ¶ added in v0.64.0
func (av AttributeWriteLockType) String() string
String returns the string representation of the AttributeWriteLockType.
type MetricBuilderOption ¶ added in v0.110.0
type MetricBuilderOption interface {
// contains filtered or unexported methods
}
MetricBuilderOption applies changes to default metrics builder.
func WithStartTime ¶ added in v0.44.0
func WithStartTime(startTime pcommon.Timestamp) MetricBuilderOption
WithStartTime sets startTime on the metrics builder.
type MetricConfig ¶ added in v0.77.0
type MetricConfig struct { Enabled bool `mapstructure:"enabled"` // contains filtered or unexported fields }
MetricConfig provides common config 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 config.
func NewMetricsBuilder ¶ added in v0.44.0
func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, options ...MetricBuilderOption) *MetricsBuilder
func (*MetricsBuilder) Emit ¶ added in v0.44.0
func (mb *MetricsBuilder) Emit(options ...ResourceMetricsOption) pmetric.Metrics
Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for recording another set of metrics. This function will be responsible for applying all the transformations required to produce metric representation defined in metadata and user config, e.g. delta or cumulative.
func (*MetricsBuilder) EmitForResource ¶ added in v0.48.0
func (mb *MetricsBuilder) EmitForResource(options ...ResourceMetricsOption)
EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for recording another set of data points as part of another resource. This function can be helpful when one scraper needs to emit metrics from several resources. Otherwise calling this function is not required, just `Emit` function can be called instead. Resource attributes should be provided as ResourceMetricsOption arguments.
func (*MetricsBuilder) NewResourceBuilder ¶ added in v0.83.0
func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder
NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics.
func (*MetricsBuilder) RecordMysqlBufferPoolDataPagesDataPoint ¶ added in v0.46.0
func (mb *MetricsBuilder) RecordMysqlBufferPoolDataPagesDataPoint(ts pcommon.Timestamp, val int64, bufferPoolDataAttributeValue AttributeBufferPoolData)
RecordMysqlBufferPoolDataPagesDataPoint adds a data point to mysql.buffer_pool.data_pages metric.
func (*MetricsBuilder) RecordMysqlBufferPoolLimitDataPoint ¶ added in v0.46.0
func (mb *MetricsBuilder) RecordMysqlBufferPoolLimitDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlBufferPoolLimitDataPoint adds a data point to mysql.buffer_pool.limit metric.
func (*MetricsBuilder) RecordMysqlBufferPoolOperationsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlBufferPoolOperationsDataPoint(ts pcommon.Timestamp, inputVal string, bufferPoolOperationsAttributeValue AttributeBufferPoolOperations) error
RecordMysqlBufferPoolOperationsDataPoint adds a data point to mysql.buffer_pool.operations metric.
func (*MetricsBuilder) RecordMysqlBufferPoolPageFlushesDataPoint ¶ added in v0.46.0
func (mb *MetricsBuilder) RecordMysqlBufferPoolPageFlushesDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlBufferPoolPageFlushesDataPoint adds a data point to mysql.buffer_pool.page_flushes metric.
func (*MetricsBuilder) RecordMysqlBufferPoolPagesDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlBufferPoolPagesDataPoint(ts pcommon.Timestamp, inputVal string, bufferPoolPagesAttributeValue AttributeBufferPoolPages) error
RecordMysqlBufferPoolPagesDataPoint adds a data point to mysql.buffer_pool.pages metric.
func (*MetricsBuilder) RecordMysqlBufferPoolUsageDataPoint ¶ added in v0.46.0
func (mb *MetricsBuilder) RecordMysqlBufferPoolUsageDataPoint(ts pcommon.Timestamp, val int64, bufferPoolDataAttributeValue AttributeBufferPoolData)
RecordMysqlBufferPoolUsageDataPoint adds a data point to mysql.buffer_pool.usage metric.
func (*MetricsBuilder) RecordMysqlClientNetworkIoDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlClientNetworkIoDataPoint(ts pcommon.Timestamp, inputVal string, directionAttributeValue AttributeDirection) error
RecordMysqlClientNetworkIoDataPoint adds a data point to mysql.client.network.io metric.
func (*MetricsBuilder) RecordMysqlCommandsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlCommandsDataPoint(ts pcommon.Timestamp, inputVal string, commandAttributeValue AttributeCommand) error
RecordMysqlCommandsDataPoint adds a data point to mysql.commands metric.
func (*MetricsBuilder) RecordMysqlConnectionCountDataPoint ¶ added in v0.67.0
func (mb *MetricsBuilder) RecordMysqlConnectionCountDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlConnectionCountDataPoint adds a data point to mysql.connection.count metric.
func (*MetricsBuilder) RecordMysqlConnectionErrorsDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlConnectionErrorsDataPoint(ts pcommon.Timestamp, inputVal string, connectionErrorAttributeValue AttributeConnectionError) error
RecordMysqlConnectionErrorsDataPoint adds a data point to mysql.connection.errors metric.
func (*MetricsBuilder) RecordMysqlDoubleWritesDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlDoubleWritesDataPoint(ts pcommon.Timestamp, inputVal string, doubleWritesAttributeValue AttributeDoubleWrites) error
RecordMysqlDoubleWritesDataPoint adds a data point to mysql.double_writes metric.
func (*MetricsBuilder) RecordMysqlHandlersDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlHandlersDataPoint(ts pcommon.Timestamp, inputVal string, handlerAttributeValue AttributeHandler) error
RecordMysqlHandlersDataPoint adds a data point to mysql.handlers metric.
func (*MetricsBuilder) RecordMysqlIndexIoWaitCountDataPoint ¶ added in v0.61.0
func (mb *MetricsBuilder) RecordMysqlIndexIoWaitCountDataPoint(ts pcommon.Timestamp, val int64, ioWaitsOperationsAttributeValue AttributeIoWaitsOperations, tableNameAttributeValue string, schemaAttributeValue string, indexNameAttributeValue string)
RecordMysqlIndexIoWaitCountDataPoint adds a data point to mysql.index.io.wait.count metric.
func (*MetricsBuilder) RecordMysqlIndexIoWaitTimeDataPoint ¶ added in v0.61.0
func (mb *MetricsBuilder) RecordMysqlIndexIoWaitTimeDataPoint(ts pcommon.Timestamp, val int64, ioWaitsOperationsAttributeValue AttributeIoWaitsOperations, tableNameAttributeValue string, schemaAttributeValue string, indexNameAttributeValue string)
RecordMysqlIndexIoWaitTimeDataPoint adds a data point to mysql.index.io.wait.time metric.
func (*MetricsBuilder) RecordMysqlJoinsDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlJoinsDataPoint(ts pcommon.Timestamp, inputVal string, joinKindAttributeValue AttributeJoinKind) error
RecordMysqlJoinsDataPoint adds a data point to mysql.joins metric.
func (*MetricsBuilder) RecordMysqlLocksDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlLocksDataPoint(ts pcommon.Timestamp, inputVal string, locksAttributeValue AttributeLocks) error
RecordMysqlLocksDataPoint adds a data point to mysql.locks metric.
func (*MetricsBuilder) RecordMysqlLogOperationsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlLogOperationsDataPoint(ts pcommon.Timestamp, inputVal string, logOperationsAttributeValue AttributeLogOperations) error
RecordMysqlLogOperationsDataPoint adds a data point to mysql.log_operations metric.
func (*MetricsBuilder) RecordMysqlMysqlxConnectionsDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlMysqlxConnectionsDataPoint(ts pcommon.Timestamp, inputVal string, connectionStatusAttributeValue AttributeConnectionStatus) error
RecordMysqlMysqlxConnectionsDataPoint adds a data point to mysql.mysqlx_connections metric.
func (*MetricsBuilder) RecordMysqlMysqlxWorkerThreadsDataPoint ¶ added in v0.63.0
func (mb *MetricsBuilder) RecordMysqlMysqlxWorkerThreadsDataPoint(ts pcommon.Timestamp, inputVal string, mysqlxThreadsAttributeValue AttributeMysqlxThreads) error
RecordMysqlMysqlxWorkerThreadsDataPoint adds a data point to mysql.mysqlx_worker_threads metric.
func (*MetricsBuilder) RecordMysqlOpenedResourcesDataPoint ¶ added in v0.63.0
func (mb *MetricsBuilder) RecordMysqlOpenedResourcesDataPoint(ts pcommon.Timestamp, inputVal string, openedResourcesAttributeValue AttributeOpenedResources) error
RecordMysqlOpenedResourcesDataPoint adds a data point to mysql.opened_resources metric.
func (*MetricsBuilder) RecordMysqlOperationsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlOperationsDataPoint(ts pcommon.Timestamp, inputVal string, operationsAttributeValue AttributeOperations) error
RecordMysqlOperationsDataPoint adds a data point to mysql.operations metric.
func (*MetricsBuilder) RecordMysqlPageOperationsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlPageOperationsDataPoint(ts pcommon.Timestamp, inputVal string, pageOperationsAttributeValue AttributePageOperations) error
RecordMysqlPageOperationsDataPoint adds a data point to mysql.page_operations metric.
func (*MetricsBuilder) RecordMysqlPreparedStatementsDataPoint ¶ added in v0.67.0
func (mb *MetricsBuilder) RecordMysqlPreparedStatementsDataPoint(ts pcommon.Timestamp, inputVal string, preparedStatementsCommandAttributeValue AttributePreparedStatementsCommand) error
RecordMysqlPreparedStatementsDataPoint adds a data point to mysql.prepared_statements metric.
func (*MetricsBuilder) RecordMysqlQueryClientCountDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlQueryClientCountDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlQueryClientCountDataPoint adds a data point to mysql.query.client.count metric.
func (*MetricsBuilder) RecordMysqlQueryCountDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlQueryCountDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlQueryCountDataPoint adds a data point to mysql.query.count metric.
func (*MetricsBuilder) RecordMysqlQuerySlowCountDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlQuerySlowCountDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlQuerySlowCountDataPoint adds a data point to mysql.query.slow.count metric.
func (*MetricsBuilder) RecordMysqlReplicaSQLDelayDataPoint ¶ added in v0.68.0
func (mb *MetricsBuilder) RecordMysqlReplicaSQLDelayDataPoint(ts pcommon.Timestamp, val int64)
RecordMysqlReplicaSQLDelayDataPoint adds a data point to mysql.replica.sql_delay metric.
func (*MetricsBuilder) RecordMysqlReplicaTimeBehindSourceDataPoint ¶ added in v0.68.0
func (mb *MetricsBuilder) RecordMysqlReplicaTimeBehindSourceDataPoint(ts pcommon.Timestamp, val int64)
RecordMysqlReplicaTimeBehindSourceDataPoint adds a data point to mysql.replica.time_behind_source metric.
func (*MetricsBuilder) RecordMysqlRowLocksDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlRowLocksDataPoint(ts pcommon.Timestamp, inputVal string, rowLocksAttributeValue AttributeRowLocks) error
RecordMysqlRowLocksDataPoint adds a data point to mysql.row_locks metric.
func (*MetricsBuilder) RecordMysqlRowOperationsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlRowOperationsDataPoint(ts pcommon.Timestamp, inputVal string, rowOperationsAttributeValue AttributeRowOperations) error
RecordMysqlRowOperationsDataPoint adds a data point to mysql.row_operations metric.
func (*MetricsBuilder) RecordMysqlSortsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlSortsDataPoint(ts pcommon.Timestamp, inputVal string, sortsAttributeValue AttributeSorts) error
RecordMysqlSortsDataPoint adds a data point to mysql.sorts metric.
func (*MetricsBuilder) RecordMysqlStatementEventCountDataPoint ¶ added in v0.63.0
func (mb *MetricsBuilder) RecordMysqlStatementEventCountDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, digestAttributeValue string, digestTextAttributeValue string, eventStateAttributeValue AttributeEventState)
RecordMysqlStatementEventCountDataPoint adds a data point to mysql.statement_event.count metric.
func (*MetricsBuilder) RecordMysqlStatementEventWaitTimeDataPoint ¶ added in v0.63.0
func (mb *MetricsBuilder) RecordMysqlStatementEventWaitTimeDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, digestAttributeValue string, digestTextAttributeValue string)
RecordMysqlStatementEventWaitTimeDataPoint adds a data point to mysql.statement_event.wait.time metric.
func (*MetricsBuilder) RecordMysqlTableAverageRowLengthDataPoint ¶ added in v0.101.0
func (mb *MetricsBuilder) RecordMysqlTableAverageRowLengthDataPoint(ts pcommon.Timestamp, val int64, tableNameAttributeValue string, schemaAttributeValue string)
RecordMysqlTableAverageRowLengthDataPoint adds a data point to mysql.table.average_row_length metric.
func (*MetricsBuilder) RecordMysqlTableIoWaitCountDataPoint ¶ added in v0.61.0
func (mb *MetricsBuilder) RecordMysqlTableIoWaitCountDataPoint(ts pcommon.Timestamp, val int64, ioWaitsOperationsAttributeValue AttributeIoWaitsOperations, tableNameAttributeValue string, schemaAttributeValue string)
RecordMysqlTableIoWaitCountDataPoint adds a data point to mysql.table.io.wait.count metric.
func (*MetricsBuilder) RecordMysqlTableIoWaitTimeDataPoint ¶ added in v0.61.0
func (mb *MetricsBuilder) RecordMysqlTableIoWaitTimeDataPoint(ts pcommon.Timestamp, val int64, ioWaitsOperationsAttributeValue AttributeIoWaitsOperations, tableNameAttributeValue string, schemaAttributeValue string)
RecordMysqlTableIoWaitTimeDataPoint adds a data point to mysql.table.io.wait.time metric.
func (*MetricsBuilder) RecordMysqlTableLockWaitReadCountDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlTableLockWaitReadCountDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, tableNameAttributeValue string, readLockTypeAttributeValue AttributeReadLockType)
RecordMysqlTableLockWaitReadCountDataPoint adds a data point to mysql.table.lock_wait.read.count metric.
func (*MetricsBuilder) RecordMysqlTableLockWaitReadTimeDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlTableLockWaitReadTimeDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, tableNameAttributeValue string, readLockTypeAttributeValue AttributeReadLockType)
RecordMysqlTableLockWaitReadTimeDataPoint adds a data point to mysql.table.lock_wait.read.time metric.
func (*MetricsBuilder) RecordMysqlTableLockWaitWriteCountDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlTableLockWaitWriteCountDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, tableNameAttributeValue string, writeLockTypeAttributeValue AttributeWriteLockType)
RecordMysqlTableLockWaitWriteCountDataPoint adds a data point to mysql.table.lock_wait.write.count metric.
func (*MetricsBuilder) RecordMysqlTableLockWaitWriteTimeDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlTableLockWaitWriteTimeDataPoint(ts pcommon.Timestamp, val int64, schemaAttributeValue string, tableNameAttributeValue string, writeLockTypeAttributeValue AttributeWriteLockType)
RecordMysqlTableLockWaitWriteTimeDataPoint adds a data point to mysql.table.lock_wait.write.time metric.
func (*MetricsBuilder) RecordMysqlTableOpenCacheDataPoint ¶ added in v0.64.0
func (mb *MetricsBuilder) RecordMysqlTableOpenCacheDataPoint(ts pcommon.Timestamp, inputVal string, cacheStatusAttributeValue AttributeCacheStatus) error
RecordMysqlTableOpenCacheDataPoint adds a data point to mysql.table_open_cache metric.
func (*MetricsBuilder) RecordMysqlTableRowsDataPoint ¶ added in v0.101.0
func (mb *MetricsBuilder) RecordMysqlTableRowsDataPoint(ts pcommon.Timestamp, val int64, tableNameAttributeValue string, schemaAttributeValue string)
RecordMysqlTableRowsDataPoint adds a data point to mysql.table.rows metric.
func (*MetricsBuilder) RecordMysqlTableSizeDataPoint ¶ added in v0.101.0
func (mb *MetricsBuilder) RecordMysqlTableSizeDataPoint(ts pcommon.Timestamp, val int64, tableNameAttributeValue string, schemaAttributeValue string, tableSizeTypeAttributeValue AttributeTableSizeType)
RecordMysqlTableSizeDataPoint adds a data point to mysql.table.size metric.
func (*MetricsBuilder) RecordMysqlThreadsDataPoint ¶ added in v0.44.0
func (mb *MetricsBuilder) RecordMysqlThreadsDataPoint(ts pcommon.Timestamp, inputVal string, threadsAttributeValue AttributeThreads) error
RecordMysqlThreadsDataPoint adds a data point to mysql.threads metric.
func (*MetricsBuilder) RecordMysqlTmpResourcesDataPoint ¶ added in v0.62.0
func (mb *MetricsBuilder) RecordMysqlTmpResourcesDataPoint(ts pcommon.Timestamp, inputVal string, tmpResourceAttributeValue AttributeTmpResource) error
RecordMysqlTmpResourcesDataPoint adds a data point to mysql.tmp_resources metric.
func (*MetricsBuilder) RecordMysqlUptimeDataPoint ¶ added in v0.79.0
func (mb *MetricsBuilder) RecordMysqlUptimeDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordMysqlUptimeDataPoint adds a data point to mysql.uptime 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 MetricsBuilderConfig ¶ added in v0.73.0
type MetricsBuilderConfig struct { Metrics MetricsConfig `mapstructure:"metrics"` ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` }
MetricsBuilderConfig is a configuration for mysql metrics builder.
func DefaultMetricsBuilderConfig ¶ added in v0.73.0
func DefaultMetricsBuilderConfig() MetricsBuilderConfig
type MetricsConfig ¶ added in v0.77.0
type MetricsConfig struct { MysqlBufferPoolDataPages MetricConfig `mapstructure:"mysql.buffer_pool.data_pages"` MysqlBufferPoolLimit MetricConfig `mapstructure:"mysql.buffer_pool.limit"` MysqlBufferPoolOperations MetricConfig `mapstructure:"mysql.buffer_pool.operations"` MysqlBufferPoolPageFlushes MetricConfig `mapstructure:"mysql.buffer_pool.page_flushes"` MysqlBufferPoolPages MetricConfig `mapstructure:"mysql.buffer_pool.pages"` MysqlBufferPoolUsage MetricConfig `mapstructure:"mysql.buffer_pool.usage"` MysqlClientNetworkIo MetricConfig `mapstructure:"mysql.client.network.io"` MysqlCommands MetricConfig `mapstructure:"mysql.commands"` MysqlConnectionCount MetricConfig `mapstructure:"mysql.connection.count"` MysqlConnectionErrors MetricConfig `mapstructure:"mysql.connection.errors"` MysqlDoubleWrites MetricConfig `mapstructure:"mysql.double_writes"` MysqlHandlers MetricConfig `mapstructure:"mysql.handlers"` MysqlIndexIoWaitCount MetricConfig `mapstructure:"mysql.index.io.wait.count"` MysqlIndexIoWaitTime MetricConfig `mapstructure:"mysql.index.io.wait.time"` MysqlJoins MetricConfig `mapstructure:"mysql.joins"` MysqlLocks MetricConfig `mapstructure:"mysql.locks"` MysqlLogOperations MetricConfig `mapstructure:"mysql.log_operations"` MysqlMysqlxConnections MetricConfig `mapstructure:"mysql.mysqlx_connections"` MysqlMysqlxWorkerThreads MetricConfig `mapstructure:"mysql.mysqlx_worker_threads"` MysqlOpenedResources MetricConfig `mapstructure:"mysql.opened_resources"` MysqlOperations MetricConfig `mapstructure:"mysql.operations"` MysqlPageOperations MetricConfig `mapstructure:"mysql.page_operations"` MysqlPreparedStatements MetricConfig `mapstructure:"mysql.prepared_statements"` MysqlQueryClientCount MetricConfig `mapstructure:"mysql.query.client.count"` MysqlQueryCount MetricConfig `mapstructure:"mysql.query.count"` MysqlQuerySlowCount MetricConfig `mapstructure:"mysql.query.slow.count"` MysqlReplicaSQLDelay MetricConfig `mapstructure:"mysql.replica.sql_delay"` MysqlReplicaTimeBehindSource MetricConfig `mapstructure:"mysql.replica.time_behind_source"` MysqlRowLocks MetricConfig `mapstructure:"mysql.row_locks"` MysqlRowOperations MetricConfig `mapstructure:"mysql.row_operations"` MysqlSorts MetricConfig `mapstructure:"mysql.sorts"` MysqlStatementEventCount MetricConfig `mapstructure:"mysql.statement_event.count"` MysqlStatementEventWaitTime MetricConfig `mapstructure:"mysql.statement_event.wait.time"` MysqlTableAverageRowLength MetricConfig `mapstructure:"mysql.table.average_row_length"` MysqlTableIoWaitCount MetricConfig `mapstructure:"mysql.table.io.wait.count"` MysqlTableIoWaitTime MetricConfig `mapstructure:"mysql.table.io.wait.time"` MysqlTableLockWaitReadCount MetricConfig `mapstructure:"mysql.table.lock_wait.read.count"` MysqlTableLockWaitReadTime MetricConfig `mapstructure:"mysql.table.lock_wait.read.time"` MysqlTableLockWaitWriteCount MetricConfig `mapstructure:"mysql.table.lock_wait.write.count"` MysqlTableLockWaitWriteTime MetricConfig `mapstructure:"mysql.table.lock_wait.write.time"` MysqlTableRows MetricConfig `mapstructure:"mysql.table.rows"` MysqlTableSize MetricConfig `mapstructure:"mysql.table.size"` MysqlTableOpenCache MetricConfig `mapstructure:"mysql.table_open_cache"` MysqlThreads MetricConfig `mapstructure:"mysql.threads"` MysqlTmpResources MetricConfig `mapstructure:"mysql.tmp_resources"` MysqlUptime MetricConfig `mapstructure:"mysql.uptime"` }
MetricsConfig provides config for mysql metrics.
func DefaultMetricsConfig ¶ added in v0.77.0
func DefaultMetricsConfig() MetricsConfig
type ResourceAttributeConfig ¶ added in v0.77.0
type ResourceAttributeConfig struct { Enabled bool `mapstructure:"enabled"` // Experimental: MetricsInclude defines a list of filters for attribute values. // If the list is not empty, only metrics with matching resource attribute values will be emitted. MetricsInclude []filter.Config `mapstructure:"metrics_include"` // Experimental: MetricsExclude defines a list of filters for attribute values. // If the list is not empty, metrics with matching resource attribute values will not be emitted. // MetricsInclude has higher priority than MetricsExclude. MetricsExclude []filter.Config `mapstructure:"metrics_exclude"` // contains filtered or unexported fields }
ResourceAttributeConfig provides common config for a particular resource attribute.
type ResourceAttributesConfig ¶ added in v0.77.0
type ResourceAttributesConfig struct {
MysqlInstanceEndpoint ResourceAttributeConfig `mapstructure:"mysql.instance.endpoint"`
}
ResourceAttributesConfig provides config for mysql resource attributes.
func DefaultResourceAttributesConfig ¶ added in v0.77.0
func DefaultResourceAttributesConfig() ResourceAttributesConfig
type ResourceBuilder ¶ added in v0.82.0
type ResourceBuilder struct {
// contains filtered or unexported fields
}
ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines.
func NewResourceBuilder ¶ added in v0.82.0
func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder
NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application.
func (*ResourceBuilder) Emit ¶ added in v0.82.0
func (rb *ResourceBuilder) Emit() pcommon.Resource
Emit returns the built resource and resets the internal builder state.
func (*ResourceBuilder) SetMysqlInstanceEndpoint ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMysqlInstanceEndpoint(val string)
SetMysqlInstanceEndpoint sets provided value as "mysql.instance.endpoint" attribute.
type ResourceMetricsOption ¶ added in v0.52.0
type ResourceMetricsOption interface {
// contains filtered or unexported methods
}
ResourceMetricsOption applies changes to provided resource metrics.
func WithResource ¶ added in v0.82.0
func WithResource(res pcommon.Resource) ResourceMetricsOption
WithResource sets the provided resource on the emitted ResourceMetrics. It's recommended to use ResourceBuilder to create the resource.
func WithStartTimeOverride ¶ added in v0.52.0
func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption
WithStartTimeOverride overrides start time for all the resource metrics data points. This option should be only used if different start time has to be set on metrics coming from different resources.