receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go (4,156 lines of code) (raw):

// Code generated by mdatagen. DO NOT EDIT. package metadata import ( "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/filter" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/receiver" ) // AttributeAssertType specifies the value assert_type attribute. type AttributeAssertType int const ( _ AttributeAssertType = iota AttributeAssertTypeRegular AttributeAssertTypeWarning AttributeAssertTypeMsg AttributeAssertTypeUser ) // String returns the string representation of the AttributeAssertType. func (av AttributeAssertType) String() string { switch av { case AttributeAssertTypeRegular: return "regular" case AttributeAssertTypeWarning: return "warning" case AttributeAssertTypeMsg: return "msg" case AttributeAssertTypeUser: return "user" } return "" } // MapAttributeAssertType is a helper map of string to AttributeAssertType attribute value. var MapAttributeAssertType = map[string]AttributeAssertType{ "regular": AttributeAssertTypeRegular, "warning": AttributeAssertTypeWarning, "msg": AttributeAssertTypeMsg, "user": AttributeAssertTypeUser, } // AttributeBtreeCounterType specifies the value btree_counter_type attribute. type AttributeBtreeCounterType int const ( _ AttributeBtreeCounterType = iota AttributeBtreeCounterTypeAccesses AttributeBtreeCounterTypeHits AttributeBtreeCounterTypeMisses ) // String returns the string representation of the AttributeBtreeCounterType. func (av AttributeBtreeCounterType) String() string { switch av { case AttributeBtreeCounterTypeAccesses: return "accesses" case AttributeBtreeCounterTypeHits: return "hits" case AttributeBtreeCounterTypeMisses: return "misses" } return "" } // MapAttributeBtreeCounterType is a helper map of string to AttributeBtreeCounterType attribute value. var MapAttributeBtreeCounterType = map[string]AttributeBtreeCounterType{ "accesses": AttributeBtreeCounterTypeAccesses, "hits": AttributeBtreeCounterTypeHits, "misses": AttributeBtreeCounterTypeMisses, } // AttributeCacheDirection specifies the value cache_direction attribute. type AttributeCacheDirection int const ( _ AttributeCacheDirection = iota AttributeCacheDirectionReadInto AttributeCacheDirectionWrittenFrom ) // String returns the string representation of the AttributeCacheDirection. func (av AttributeCacheDirection) String() string { switch av { case AttributeCacheDirectionReadInto: return "read_into" case AttributeCacheDirectionWrittenFrom: return "written_from" } return "" } // MapAttributeCacheDirection is a helper map of string to AttributeCacheDirection attribute value. var MapAttributeCacheDirection = map[string]AttributeCacheDirection{ "read_into": AttributeCacheDirectionReadInto, "written_from": AttributeCacheDirectionWrittenFrom, } // AttributeCacheRatioType specifies the value cache_ratio_type attribute. type AttributeCacheRatioType int const ( _ AttributeCacheRatioType = iota AttributeCacheRatioTypeCacheFill AttributeCacheRatioTypeDirtyFill ) // String returns the string representation of the AttributeCacheRatioType. func (av AttributeCacheRatioType) String() string { switch av { case AttributeCacheRatioTypeCacheFill: return "cache_fill" case AttributeCacheRatioTypeDirtyFill: return "dirty_fill" } return "" } // MapAttributeCacheRatioType is a helper map of string to AttributeCacheRatioType attribute value. var MapAttributeCacheRatioType = map[string]AttributeCacheRatioType{ "cache_fill": AttributeCacheRatioTypeCacheFill, "dirty_fill": AttributeCacheRatioTypeDirtyFill, } // AttributeCacheStatus specifies the value cache_status attribute. type AttributeCacheStatus int const ( _ AttributeCacheStatus = iota AttributeCacheStatusDirty AttributeCacheStatusUsed ) // String returns the string representation of the AttributeCacheStatus. func (av AttributeCacheStatus) String() string { switch av { case AttributeCacheStatusDirty: return "dirty" case AttributeCacheStatusUsed: return "used" } return "" } // MapAttributeCacheStatus is a helper map of string to AttributeCacheStatus attribute value. var MapAttributeCacheStatus = map[string]AttributeCacheStatus{ "dirty": AttributeCacheStatusDirty, "used": AttributeCacheStatusUsed, } // AttributeClusterRole specifies the value cluster_role attribute. type AttributeClusterRole int const ( _ AttributeClusterRole = iota AttributeClusterRolePrimary AttributeClusterRoleReplica ) // String returns the string representation of the AttributeClusterRole. func (av AttributeClusterRole) String() string { switch av { case AttributeClusterRolePrimary: return "primary" case AttributeClusterRoleReplica: return "replica" } return "" } // MapAttributeClusterRole is a helper map of string to AttributeClusterRole attribute value. var MapAttributeClusterRole = map[string]AttributeClusterRole{ "primary": AttributeClusterRolePrimary, "replica": AttributeClusterRoleReplica, } // AttributeCPUState specifies the value cpu_state attribute. type AttributeCPUState int const ( _ AttributeCPUState = iota AttributeCPUStateKernel AttributeCPUStateUser AttributeCPUStateNice AttributeCPUStateIowait AttributeCPUStateIrq AttributeCPUStateSoftirq AttributeCPUStateGuest AttributeCPUStateSteal ) // String returns the string representation of the AttributeCPUState. func (av AttributeCPUState) String() string { switch av { case AttributeCPUStateKernel: return "kernel" case AttributeCPUStateUser: return "user" case AttributeCPUStateNice: return "nice" case AttributeCPUStateIowait: return "iowait" case AttributeCPUStateIrq: return "irq" case AttributeCPUStateSoftirq: return "softirq" case AttributeCPUStateGuest: return "guest" case AttributeCPUStateSteal: return "steal" } return "" } // MapAttributeCPUState is a helper map of string to AttributeCPUState attribute value. var MapAttributeCPUState = map[string]AttributeCPUState{ "kernel": AttributeCPUStateKernel, "user": AttributeCPUStateUser, "nice": AttributeCPUStateNice, "iowait": AttributeCPUStateIowait, "irq": AttributeCPUStateIrq, "softirq": AttributeCPUStateSoftirq, "guest": AttributeCPUStateGuest, "steal": AttributeCPUStateSteal, } // AttributeCursorState specifies the value cursor_state attribute. type AttributeCursorState int const ( _ AttributeCursorState = iota AttributeCursorStateTimedOut AttributeCursorStateOpen ) // String returns the string representation of the AttributeCursorState. func (av AttributeCursorState) String() string { switch av { case AttributeCursorStateTimedOut: return "timed_out" case AttributeCursorStateOpen: return "open" } return "" } // MapAttributeCursorState is a helper map of string to AttributeCursorState attribute value. var MapAttributeCursorState = map[string]AttributeCursorState{ "timed_out": AttributeCursorStateTimedOut, "open": AttributeCursorStateOpen, } // AttributeDirection specifies the value direction attribute. type AttributeDirection int const ( _ AttributeDirection = iota AttributeDirectionReceive AttributeDirectionTransmit ) // String returns the string representation of the AttributeDirection. func (av AttributeDirection) String() string { switch av { case AttributeDirectionReceive: return "receive" case AttributeDirectionTransmit: return "transmit" } return "" } // MapAttributeDirection is a helper map of string to AttributeDirection attribute value. var MapAttributeDirection = map[string]AttributeDirection{ "receive": AttributeDirectionReceive, "transmit": AttributeDirectionTransmit, } // AttributeDiskDirection specifies the value disk_direction attribute. type AttributeDiskDirection int const ( _ AttributeDiskDirection = iota AttributeDiskDirectionRead AttributeDiskDirectionWrite AttributeDiskDirectionTotal ) // String returns the string representation of the AttributeDiskDirection. func (av AttributeDiskDirection) String() string { switch av { case AttributeDiskDirectionRead: return "read" case AttributeDiskDirectionWrite: return "write" case AttributeDiskDirectionTotal: return "total" } return "" } // MapAttributeDiskDirection is a helper map of string to AttributeDiskDirection attribute value. var MapAttributeDiskDirection = map[string]AttributeDiskDirection{ "read": AttributeDiskDirectionRead, "write": AttributeDiskDirectionWrite, "total": AttributeDiskDirectionTotal, } // AttributeDiskStatus specifies the value disk_status attribute. type AttributeDiskStatus int const ( _ AttributeDiskStatus = iota AttributeDiskStatusFree AttributeDiskStatusUsed ) // String returns the string representation of the AttributeDiskStatus. func (av AttributeDiskStatus) String() string { switch av { case AttributeDiskStatusFree: return "free" case AttributeDiskStatusUsed: return "used" } return "" } // MapAttributeDiskStatus is a helper map of string to AttributeDiskStatus attribute value. var MapAttributeDiskStatus = map[string]AttributeDiskStatus{ "free": AttributeDiskStatusFree, "used": AttributeDiskStatusUsed, } // AttributeDocumentStatus specifies the value document_status attribute. type AttributeDocumentStatus int const ( _ AttributeDocumentStatus = iota AttributeDocumentStatusReturned AttributeDocumentStatusInserted AttributeDocumentStatusUpdated AttributeDocumentStatusDeleted ) // String returns the string representation of the AttributeDocumentStatus. func (av AttributeDocumentStatus) String() string { switch av { case AttributeDocumentStatusReturned: return "returned" case AttributeDocumentStatusInserted: return "inserted" case AttributeDocumentStatusUpdated: return "updated" case AttributeDocumentStatusDeleted: return "deleted" } return "" } // MapAttributeDocumentStatus is a helper map of string to AttributeDocumentStatus attribute value. var MapAttributeDocumentStatus = map[string]AttributeDocumentStatus{ "returned": AttributeDocumentStatusReturned, "inserted": AttributeDocumentStatusInserted, "updated": AttributeDocumentStatusUpdated, "deleted": AttributeDocumentStatusDeleted, } // AttributeExecutionType specifies the value execution_type attribute. type AttributeExecutionType int const ( _ AttributeExecutionType = iota AttributeExecutionTypeReads AttributeExecutionTypeWrites AttributeExecutionTypeCommands ) // String returns the string representation of the AttributeExecutionType. func (av AttributeExecutionType) String() string { switch av { case AttributeExecutionTypeReads: return "reads" case AttributeExecutionTypeWrites: return "writes" case AttributeExecutionTypeCommands: return "commands" } return "" } // MapAttributeExecutionType is a helper map of string to AttributeExecutionType attribute value. var MapAttributeExecutionType = map[string]AttributeExecutionType{ "reads": AttributeExecutionTypeReads, "writes": AttributeExecutionTypeWrites, "commands": AttributeExecutionTypeCommands, } // AttributeGlobalLockState specifies the value global_lock_state attribute. type AttributeGlobalLockState int const ( _ AttributeGlobalLockState = iota AttributeGlobalLockStateCurrentQueueTotal AttributeGlobalLockStateCurrentQueueReaders AttributeGlobalLockStateCurrentQueueWriters ) // String returns the string representation of the AttributeGlobalLockState. func (av AttributeGlobalLockState) String() string { switch av { case AttributeGlobalLockStateCurrentQueueTotal: return "current_queue_total" case AttributeGlobalLockStateCurrentQueueReaders: return "current_queue_readers" case AttributeGlobalLockStateCurrentQueueWriters: return "current_queue_writers" } return "" } // MapAttributeGlobalLockState is a helper map of string to AttributeGlobalLockState attribute value. var MapAttributeGlobalLockState = map[string]AttributeGlobalLockState{ "current_queue_total": AttributeGlobalLockStateCurrentQueueTotal, "current_queue_readers": AttributeGlobalLockStateCurrentQueueReaders, "current_queue_writers": AttributeGlobalLockStateCurrentQueueWriters, } // AttributeMemoryIssueType specifies the value memory_issue_type attribute. type AttributeMemoryIssueType int const ( _ AttributeMemoryIssueType = iota AttributeMemoryIssueTypeExtraInfo AttributeMemoryIssueTypeGlobalAccessesNotInMemory AttributeMemoryIssueTypeExceptionsThrown ) // String returns the string representation of the AttributeMemoryIssueType. func (av AttributeMemoryIssueType) String() string { switch av { case AttributeMemoryIssueTypeExtraInfo: return "extra_info" case AttributeMemoryIssueTypeGlobalAccessesNotInMemory: return "global_accesses_not_in_memory" case AttributeMemoryIssueTypeExceptionsThrown: return "exceptions_thrown" } return "" } // MapAttributeMemoryIssueType is a helper map of string to AttributeMemoryIssueType attribute value. var MapAttributeMemoryIssueType = map[string]AttributeMemoryIssueType{ "extra_info": AttributeMemoryIssueTypeExtraInfo, "global_accesses_not_in_memory": AttributeMemoryIssueTypeGlobalAccessesNotInMemory, "exceptions_thrown": AttributeMemoryIssueTypeExceptionsThrown, } // AttributeMemoryState specifies the value memory_state attribute. type AttributeMemoryState int const ( _ AttributeMemoryState = iota AttributeMemoryStateResident AttributeMemoryStateVirtual AttributeMemoryStateMapped AttributeMemoryStateComputed AttributeMemoryStateShared AttributeMemoryStateFree AttributeMemoryStateUsed ) // String returns the string representation of the AttributeMemoryState. func (av AttributeMemoryState) String() string { switch av { case AttributeMemoryStateResident: return "resident" case AttributeMemoryStateVirtual: return "virtual" case AttributeMemoryStateMapped: return "mapped" case AttributeMemoryStateComputed: return "computed" case AttributeMemoryStateShared: return "shared" case AttributeMemoryStateFree: return "free" case AttributeMemoryStateUsed: return "used" } return "" } // MapAttributeMemoryState is a helper map of string to AttributeMemoryState attribute value. var MapAttributeMemoryState = map[string]AttributeMemoryState{ "resident": AttributeMemoryStateResident, "virtual": AttributeMemoryStateVirtual, "mapped": AttributeMemoryStateMapped, "computed": AttributeMemoryStateComputed, "shared": AttributeMemoryStateShared, "free": AttributeMemoryStateFree, "used": AttributeMemoryStateUsed, } // AttributeMemoryStatus specifies the value memory_status attribute. type AttributeMemoryStatus int const ( _ AttributeMemoryStatus = iota AttributeMemoryStatusAvailable AttributeMemoryStatusBuffers AttributeMemoryStatusCached AttributeMemoryStatusFree AttributeMemoryStatusShared AttributeMemoryStatusUsed ) // String returns the string representation of the AttributeMemoryStatus. func (av AttributeMemoryStatus) String() string { switch av { case AttributeMemoryStatusAvailable: return "available" case AttributeMemoryStatusBuffers: return "buffers" case AttributeMemoryStatusCached: return "cached" case AttributeMemoryStatusFree: return "free" case AttributeMemoryStatusShared: return "shared" case AttributeMemoryStatusUsed: return "used" } return "" } // MapAttributeMemoryStatus is a helper map of string to AttributeMemoryStatus attribute value. var MapAttributeMemoryStatus = map[string]AttributeMemoryStatus{ "available": AttributeMemoryStatusAvailable, "buffers": AttributeMemoryStatusBuffers, "cached": AttributeMemoryStatusCached, "free": AttributeMemoryStatusFree, "shared": AttributeMemoryStatusShared, "used": AttributeMemoryStatusUsed, } // AttributeObjectType specifies the value object_type attribute. type AttributeObjectType int const ( _ AttributeObjectType = iota AttributeObjectTypeCollection AttributeObjectTypeIndex AttributeObjectTypeExtent AttributeObjectTypeObject AttributeObjectTypeView AttributeObjectTypeStorage AttributeObjectTypeData ) // String returns the string representation of the AttributeObjectType. func (av AttributeObjectType) String() string { switch av { case AttributeObjectTypeCollection: return "collection" case AttributeObjectTypeIndex: return "index" case AttributeObjectTypeExtent: return "extent" case AttributeObjectTypeObject: return "object" case AttributeObjectTypeView: return "view" case AttributeObjectTypeStorage: return "storage" case AttributeObjectTypeData: return "data" } return "" } // MapAttributeObjectType is a helper map of string to AttributeObjectType attribute value. var MapAttributeObjectType = map[string]AttributeObjectType{ "collection": AttributeObjectTypeCollection, "index": AttributeObjectTypeIndex, "extent": AttributeObjectTypeExtent, "object": AttributeObjectTypeObject, "view": AttributeObjectTypeView, "storage": AttributeObjectTypeStorage, "data": AttributeObjectTypeData, } // AttributeOperation specifies the value operation attribute. type AttributeOperation int const ( _ AttributeOperation = iota AttributeOperationCmd AttributeOperationQuery AttributeOperationUpdate AttributeOperationDelete AttributeOperationGetmore AttributeOperationInsert AttributeOperationScanAndOrder AttributeOperationTTLDeleted ) // String returns the string representation of the AttributeOperation. func (av AttributeOperation) String() string { switch av { case AttributeOperationCmd: return "cmd" case AttributeOperationQuery: return "query" case AttributeOperationUpdate: return "update" case AttributeOperationDelete: return "delete" case AttributeOperationGetmore: return "getmore" case AttributeOperationInsert: return "insert" case AttributeOperationScanAndOrder: return "scan_and_order" case AttributeOperationTTLDeleted: return "ttl_deleted" } return "" } // MapAttributeOperation is a helper map of string to AttributeOperation attribute value. var MapAttributeOperation = map[string]AttributeOperation{ "cmd": AttributeOperationCmd, "query": AttributeOperationQuery, "update": AttributeOperationUpdate, "delete": AttributeOperationDelete, "getmore": AttributeOperationGetmore, "insert": AttributeOperationInsert, "scan_and_order": AttributeOperationScanAndOrder, "ttl_deleted": AttributeOperationTTLDeleted, } // AttributeOplogType specifies the value oplog_type attribute. type AttributeOplogType int const ( _ AttributeOplogType = iota AttributeOplogTypeSlaveLagMasterTime AttributeOplogTypeMasterTime AttributeOplogTypeMasterLagTimeDiff ) // String returns the string representation of the AttributeOplogType. func (av AttributeOplogType) String() string { switch av { case AttributeOplogTypeSlaveLagMasterTime: return "slave_lag_master_time" case AttributeOplogTypeMasterTime: return "master_time" case AttributeOplogTypeMasterLagTimeDiff: return "master_lag_time_diff" } return "" } // MapAttributeOplogType is a helper map of string to AttributeOplogType attribute value. var MapAttributeOplogType = map[string]AttributeOplogType{ "slave_lag_master_time": AttributeOplogTypeSlaveLagMasterTime, "master_time": AttributeOplogTypeMasterTime, "master_lag_time_diff": AttributeOplogTypeMasterLagTimeDiff, } // AttributeScannedType specifies the value scanned_type attribute. type AttributeScannedType int const ( _ AttributeScannedType = iota AttributeScannedTypeIndexItems AttributeScannedTypeObjects ) // String returns the string representation of the AttributeScannedType. func (av AttributeScannedType) String() string { switch av { case AttributeScannedTypeIndexItems: return "index_items" case AttributeScannedTypeObjects: return "objects" } return "" } // MapAttributeScannedType is a helper map of string to AttributeScannedType attribute value. var MapAttributeScannedType = map[string]AttributeScannedType{ "index_items": AttributeScannedTypeIndexItems, "objects": AttributeScannedTypeObjects, } // AttributeStorageStatus specifies the value storage_status attribute. type AttributeStorageStatus int const ( _ AttributeStorageStatus = iota AttributeStorageStatusTotal AttributeStorageStatusDataSize AttributeStorageStatusIndexSize AttributeStorageStatusDataSizeWoSystem ) // String returns the string representation of the AttributeStorageStatus. func (av AttributeStorageStatus) String() string { switch av { case AttributeStorageStatusTotal: return "total" case AttributeStorageStatusDataSize: return "data_size" case AttributeStorageStatusIndexSize: return "index_size" case AttributeStorageStatusDataSizeWoSystem: return "data_size_wo_system" } return "" } // MapAttributeStorageStatus is a helper map of string to AttributeStorageStatus attribute value. var MapAttributeStorageStatus = map[string]AttributeStorageStatus{ "total": AttributeStorageStatusTotal, "data_size": AttributeStorageStatusDataSize, "index_size": AttributeStorageStatusIndexSize, "data_size_wo_system": AttributeStorageStatusDataSizeWoSystem, } // AttributeTicketType specifies the value ticket_type attribute. type AttributeTicketType int const ( _ AttributeTicketType = iota AttributeTicketTypeAvailableReads AttributeTicketTypeAvailableWrites ) // String returns the string representation of the AttributeTicketType. func (av AttributeTicketType) String() string { switch av { case AttributeTicketTypeAvailableReads: return "available_reads" case AttributeTicketTypeAvailableWrites: return "available_writes" } return "" } // MapAttributeTicketType is a helper map of string to AttributeTicketType attribute value. var MapAttributeTicketType = map[string]AttributeTicketType{ "available_reads": AttributeTicketTypeAvailableReads, "available_writes": AttributeTicketTypeAvailableWrites, } var MetricsInfo = metricsInfo{ MongodbatlasDbCounts: metricInfo{ Name: "mongodbatlas.db.counts", }, MongodbatlasDbSize: metricInfo{ Name: "mongodbatlas.db.size", }, MongodbatlasDiskPartitionIopsAverage: metricInfo{ Name: "mongodbatlas.disk.partition.iops.average", }, MongodbatlasDiskPartitionIopsMax: metricInfo{ Name: "mongodbatlas.disk.partition.iops.max", }, MongodbatlasDiskPartitionLatencyAverage: metricInfo{ Name: "mongodbatlas.disk.partition.latency.average", }, MongodbatlasDiskPartitionLatencyMax: metricInfo{ Name: "mongodbatlas.disk.partition.latency.max", }, MongodbatlasDiskPartitionQueueDepth: metricInfo{ Name: "mongodbatlas.disk.partition.queue.depth", }, MongodbatlasDiskPartitionSpaceAverage: metricInfo{ Name: "mongodbatlas.disk.partition.space.average", }, MongodbatlasDiskPartitionSpaceMax: metricInfo{ Name: "mongodbatlas.disk.partition.space.max", }, MongodbatlasDiskPartitionThroughput: metricInfo{ Name: "mongodbatlas.disk.partition.throughput", }, MongodbatlasDiskPartitionUsageAverage: metricInfo{ Name: "mongodbatlas.disk.partition.usage.average", }, MongodbatlasDiskPartitionUsageMax: metricInfo{ Name: "mongodbatlas.disk.partition.usage.max", }, MongodbatlasDiskPartitionUtilizationAverage: metricInfo{ Name: "mongodbatlas.disk.partition.utilization.average", }, MongodbatlasDiskPartitionUtilizationMax: metricInfo{ Name: "mongodbatlas.disk.partition.utilization.max", }, MongodbatlasProcessAsserts: metricInfo{ Name: "mongodbatlas.process.asserts", }, MongodbatlasProcessBackgroundFlush: metricInfo{ Name: "mongodbatlas.process.background_flush", }, MongodbatlasProcessCacheIo: metricInfo{ Name: "mongodbatlas.process.cache.io", }, MongodbatlasProcessCacheRatio: metricInfo{ Name: "mongodbatlas.process.cache.ratio", }, MongodbatlasProcessCacheSize: metricInfo{ Name: "mongodbatlas.process.cache.size", }, MongodbatlasProcessConnections: metricInfo{ Name: "mongodbatlas.process.connections", }, MongodbatlasProcessCPUChildrenNormalizedUsageAverage: metricInfo{ Name: "mongodbatlas.process.cpu.children.normalized.usage.average", }, MongodbatlasProcessCPUChildrenNormalizedUsageMax: metricInfo{ Name: "mongodbatlas.process.cpu.children.normalized.usage.max", }, MongodbatlasProcessCPUChildrenUsageAverage: metricInfo{ Name: "mongodbatlas.process.cpu.children.usage.average", }, MongodbatlasProcessCPUChildrenUsageMax: metricInfo{ Name: "mongodbatlas.process.cpu.children.usage.max", }, MongodbatlasProcessCPUNormalizedUsageAverage: metricInfo{ Name: "mongodbatlas.process.cpu.normalized.usage.average", }, MongodbatlasProcessCPUNormalizedUsageMax: metricInfo{ Name: "mongodbatlas.process.cpu.normalized.usage.max", }, MongodbatlasProcessCPUUsageAverage: metricInfo{ Name: "mongodbatlas.process.cpu.usage.average", }, MongodbatlasProcessCPUUsageMax: metricInfo{ Name: "mongodbatlas.process.cpu.usage.max", }, MongodbatlasProcessCursors: metricInfo{ Name: "mongodbatlas.process.cursors", }, MongodbatlasProcessDbDocumentRate: metricInfo{ Name: "mongodbatlas.process.db.document.rate", }, MongodbatlasProcessDbOperationsRate: metricInfo{ Name: "mongodbatlas.process.db.operations.rate", }, MongodbatlasProcessDbOperationsTime: metricInfo{ Name: "mongodbatlas.process.db.operations.time", }, MongodbatlasProcessDbQueryExecutorScanned: metricInfo{ Name: "mongodbatlas.process.db.query_executor.scanned", }, MongodbatlasProcessDbQueryTargetingScannedPerReturned: metricInfo{ Name: "mongodbatlas.process.db.query_targeting.scanned_per_returned", }, MongodbatlasProcessDbStorage: metricInfo{ Name: "mongodbatlas.process.db.storage", }, MongodbatlasProcessGlobalLock: metricInfo{ Name: "mongodbatlas.process.global_lock", }, MongodbatlasProcessIndexBtreeMissRatio: metricInfo{ Name: "mongodbatlas.process.index.btree_miss_ratio", }, MongodbatlasProcessIndexCounters: metricInfo{ Name: "mongodbatlas.process.index.counters", }, MongodbatlasProcessJournalingCommits: metricInfo{ Name: "mongodbatlas.process.journaling.commits", }, MongodbatlasProcessJournalingDataFiles: metricInfo{ Name: "mongodbatlas.process.journaling.data_files", }, MongodbatlasProcessJournalingWritten: metricInfo{ Name: "mongodbatlas.process.journaling.written", }, MongodbatlasProcessMemoryUsage: metricInfo{ Name: "mongodbatlas.process.memory.usage", }, MongodbatlasProcessNetworkIo: metricInfo{ Name: "mongodbatlas.process.network.io", }, MongodbatlasProcessNetworkRequests: metricInfo{ Name: "mongodbatlas.process.network.requests", }, MongodbatlasProcessOplogRate: metricInfo{ Name: "mongodbatlas.process.oplog.rate", }, MongodbatlasProcessOplogTime: metricInfo{ Name: "mongodbatlas.process.oplog.time", }, MongodbatlasProcessPageFaults: metricInfo{ Name: "mongodbatlas.process.page_faults", }, MongodbatlasProcessRestarts: metricInfo{ Name: "mongodbatlas.process.restarts", }, MongodbatlasProcessTickets: metricInfo{ Name: "mongodbatlas.process.tickets", }, MongodbatlasSystemCPUNormalizedUsageAverage: metricInfo{ Name: "mongodbatlas.system.cpu.normalized.usage.average", }, MongodbatlasSystemCPUNormalizedUsageMax: metricInfo{ Name: "mongodbatlas.system.cpu.normalized.usage.max", }, MongodbatlasSystemCPUUsageAverage: metricInfo{ Name: "mongodbatlas.system.cpu.usage.average", }, MongodbatlasSystemCPUUsageMax: metricInfo{ Name: "mongodbatlas.system.cpu.usage.max", }, MongodbatlasSystemFtsCPUNormalizedUsage: metricInfo{ Name: "mongodbatlas.system.fts.cpu.normalized.usage", }, MongodbatlasSystemFtsCPUUsage: metricInfo{ Name: "mongodbatlas.system.fts.cpu.usage", }, MongodbatlasSystemFtsDiskUsed: metricInfo{ Name: "mongodbatlas.system.fts.disk.used", }, MongodbatlasSystemFtsMemoryUsage: metricInfo{ Name: "mongodbatlas.system.fts.memory.usage", }, MongodbatlasSystemMemoryUsageAverage: metricInfo{ Name: "mongodbatlas.system.memory.usage.average", }, MongodbatlasSystemMemoryUsageMax: metricInfo{ Name: "mongodbatlas.system.memory.usage.max", }, MongodbatlasSystemNetworkIoAverage: metricInfo{ Name: "mongodbatlas.system.network.io.average", }, MongodbatlasSystemNetworkIoMax: metricInfo{ Name: "mongodbatlas.system.network.io.max", }, MongodbatlasSystemPagingIoAverage: metricInfo{ Name: "mongodbatlas.system.paging.io.average", }, MongodbatlasSystemPagingIoMax: metricInfo{ Name: "mongodbatlas.system.paging.io.max", }, MongodbatlasSystemPagingUsageAverage: metricInfo{ Name: "mongodbatlas.system.paging.usage.average", }, MongodbatlasSystemPagingUsageMax: metricInfo{ Name: "mongodbatlas.system.paging.usage.max", }, } type metricsInfo struct { MongodbatlasDbCounts metricInfo MongodbatlasDbSize metricInfo MongodbatlasDiskPartitionIopsAverage metricInfo MongodbatlasDiskPartitionIopsMax metricInfo MongodbatlasDiskPartitionLatencyAverage metricInfo MongodbatlasDiskPartitionLatencyMax metricInfo MongodbatlasDiskPartitionQueueDepth metricInfo MongodbatlasDiskPartitionSpaceAverage metricInfo MongodbatlasDiskPartitionSpaceMax metricInfo MongodbatlasDiskPartitionThroughput metricInfo MongodbatlasDiskPartitionUsageAverage metricInfo MongodbatlasDiskPartitionUsageMax metricInfo MongodbatlasDiskPartitionUtilizationAverage metricInfo MongodbatlasDiskPartitionUtilizationMax metricInfo MongodbatlasProcessAsserts metricInfo MongodbatlasProcessBackgroundFlush metricInfo MongodbatlasProcessCacheIo metricInfo MongodbatlasProcessCacheRatio metricInfo MongodbatlasProcessCacheSize metricInfo MongodbatlasProcessConnections metricInfo MongodbatlasProcessCPUChildrenNormalizedUsageAverage metricInfo MongodbatlasProcessCPUChildrenNormalizedUsageMax metricInfo MongodbatlasProcessCPUChildrenUsageAverage metricInfo MongodbatlasProcessCPUChildrenUsageMax metricInfo MongodbatlasProcessCPUNormalizedUsageAverage metricInfo MongodbatlasProcessCPUNormalizedUsageMax metricInfo MongodbatlasProcessCPUUsageAverage metricInfo MongodbatlasProcessCPUUsageMax metricInfo MongodbatlasProcessCursors metricInfo MongodbatlasProcessDbDocumentRate metricInfo MongodbatlasProcessDbOperationsRate metricInfo MongodbatlasProcessDbOperationsTime metricInfo MongodbatlasProcessDbQueryExecutorScanned metricInfo MongodbatlasProcessDbQueryTargetingScannedPerReturned metricInfo MongodbatlasProcessDbStorage metricInfo MongodbatlasProcessGlobalLock metricInfo MongodbatlasProcessIndexBtreeMissRatio metricInfo MongodbatlasProcessIndexCounters metricInfo MongodbatlasProcessJournalingCommits metricInfo MongodbatlasProcessJournalingDataFiles metricInfo MongodbatlasProcessJournalingWritten metricInfo MongodbatlasProcessMemoryUsage metricInfo MongodbatlasProcessNetworkIo metricInfo MongodbatlasProcessNetworkRequests metricInfo MongodbatlasProcessOplogRate metricInfo MongodbatlasProcessOplogTime metricInfo MongodbatlasProcessPageFaults metricInfo MongodbatlasProcessRestarts metricInfo MongodbatlasProcessTickets metricInfo MongodbatlasSystemCPUNormalizedUsageAverage metricInfo MongodbatlasSystemCPUNormalizedUsageMax metricInfo MongodbatlasSystemCPUUsageAverage metricInfo MongodbatlasSystemCPUUsageMax metricInfo MongodbatlasSystemFtsCPUNormalizedUsage metricInfo MongodbatlasSystemFtsCPUUsage metricInfo MongodbatlasSystemFtsDiskUsed metricInfo MongodbatlasSystemFtsMemoryUsage metricInfo MongodbatlasSystemMemoryUsageAverage metricInfo MongodbatlasSystemMemoryUsageMax metricInfo MongodbatlasSystemNetworkIoAverage metricInfo MongodbatlasSystemNetworkIoMax metricInfo MongodbatlasSystemPagingIoAverage metricInfo MongodbatlasSystemPagingIoMax metricInfo MongodbatlasSystemPagingUsageAverage metricInfo MongodbatlasSystemPagingUsageMax metricInfo } type metricInfo struct { Name string } type metricMongodbatlasDbCounts struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.db.counts metric with initial data. func (m *metricMongodbatlasDbCounts) init() { m.data.SetName("mongodbatlas.db.counts") m.data.SetDescription("Database feature size") m.data.SetUnit("{objects}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDbCounts) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, objectTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("object_type", objectTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDbCounts) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDbCounts) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDbCounts(cfg MetricConfig) metricMongodbatlasDbCounts { m := metricMongodbatlasDbCounts{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDbSize struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.db.size metric with initial data. func (m *metricMongodbatlasDbSize) init() { m.data.SetName("mongodbatlas.db.size") m.data.SetDescription("Database feature size") m.data.SetUnit("By") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDbSize) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, objectTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("object_type", objectTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDbSize) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDbSize) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDbSize(cfg MetricConfig) metricMongodbatlasDbSize { m := metricMongodbatlasDbSize{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionIopsAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.iops.average metric with initial data. func (m *metricMongodbatlasDiskPartitionIopsAverage) init() { m.data.SetName("mongodbatlas.disk.partition.iops.average") m.data.SetDescription("Disk partition iops") m.data.SetUnit("{ops}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionIopsAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskDirectionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_direction", diskDirectionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionIopsAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionIopsAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionIopsAverage(cfg MetricConfig) metricMongodbatlasDiskPartitionIopsAverage { m := metricMongodbatlasDiskPartitionIopsAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionIopsMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.iops.max metric with initial data. func (m *metricMongodbatlasDiskPartitionIopsMax) init() { m.data.SetName("mongodbatlas.disk.partition.iops.max") m.data.SetDescription("Disk partition iops") m.data.SetUnit("{ops}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionIopsMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskDirectionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_direction", diskDirectionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionIopsMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionIopsMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionIopsMax(cfg MetricConfig) metricMongodbatlasDiskPartitionIopsMax { m := metricMongodbatlasDiskPartitionIopsMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionLatencyAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.latency.average metric with initial data. func (m *metricMongodbatlasDiskPartitionLatencyAverage) init() { m.data.SetName("mongodbatlas.disk.partition.latency.average") m.data.SetDescription("Disk partition latency") m.data.SetUnit("ms") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionLatencyAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskDirectionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_direction", diskDirectionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionLatencyAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionLatencyAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionLatencyAverage(cfg MetricConfig) metricMongodbatlasDiskPartitionLatencyAverage { m := metricMongodbatlasDiskPartitionLatencyAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionLatencyMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.latency.max metric with initial data. func (m *metricMongodbatlasDiskPartitionLatencyMax) init() { m.data.SetName("mongodbatlas.disk.partition.latency.max") m.data.SetDescription("Disk partition latency") m.data.SetUnit("ms") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionLatencyMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskDirectionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_direction", diskDirectionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionLatencyMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionLatencyMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionLatencyMax(cfg MetricConfig) metricMongodbatlasDiskPartitionLatencyMax { m := metricMongodbatlasDiskPartitionLatencyMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionQueueDepth struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.queue.depth metric with initial data. func (m *metricMongodbatlasDiskPartitionQueueDepth) init() { m.data.SetName("mongodbatlas.disk.partition.queue.depth") m.data.SetDescription("Disk queue depth") m.data.SetUnit("1") m.data.SetEmptyGauge() } func (m *metricMongodbatlasDiskPartitionQueueDepth) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionQueueDepth) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionQueueDepth) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionQueueDepth(cfg MetricConfig) metricMongodbatlasDiskPartitionQueueDepth { m := metricMongodbatlasDiskPartitionQueueDepth{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionSpaceAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.space.average metric with initial data. func (m *metricMongodbatlasDiskPartitionSpaceAverage) init() { m.data.SetName("mongodbatlas.disk.partition.space.average") m.data.SetDescription("Disk partition space") m.data.SetUnit("By") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionSpaceAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_status", diskStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionSpaceAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionSpaceAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionSpaceAverage(cfg MetricConfig) metricMongodbatlasDiskPartitionSpaceAverage { m := metricMongodbatlasDiskPartitionSpaceAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionSpaceMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.space.max metric with initial data. func (m *metricMongodbatlasDiskPartitionSpaceMax) init() { m.data.SetName("mongodbatlas.disk.partition.space.max") m.data.SetDescription("Disk partition space") m.data.SetUnit("By") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionSpaceMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_status", diskStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionSpaceMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionSpaceMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionSpaceMax(cfg MetricConfig) metricMongodbatlasDiskPartitionSpaceMax { m := metricMongodbatlasDiskPartitionSpaceMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionThroughput struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.throughput metric with initial data. func (m *metricMongodbatlasDiskPartitionThroughput) init() { m.data.SetName("mongodbatlas.disk.partition.throughput") m.data.SetDescription("Disk throughput") m.data.SetUnit("By/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionThroughput) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskDirectionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_direction", diskDirectionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionThroughput) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionThroughput) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionThroughput(cfg MetricConfig) metricMongodbatlasDiskPartitionThroughput { m := metricMongodbatlasDiskPartitionThroughput{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.usage.average metric with initial data. func (m *metricMongodbatlasDiskPartitionUsageAverage) init() { m.data.SetName("mongodbatlas.disk.partition.usage.average") m.data.SetDescription("Disk partition usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_status", diskStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionUsageAverage(cfg MetricConfig) metricMongodbatlasDiskPartitionUsageAverage { m := metricMongodbatlasDiskPartitionUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.usage.max metric with initial data. func (m *metricMongodbatlasDiskPartitionUsageMax) init() { m.data.SetName("mongodbatlas.disk.partition.usage.max") m.data.SetDescription("Disk partition usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasDiskPartitionUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, diskStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("disk_status", diskStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionUsageMax(cfg MetricConfig) metricMongodbatlasDiskPartitionUsageMax { m := metricMongodbatlasDiskPartitionUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionUtilizationAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.utilization.average metric with initial data. func (m *metricMongodbatlasDiskPartitionUtilizationAverage) init() { m.data.SetName("mongodbatlas.disk.partition.utilization.average") m.data.SetDescription("The percentage of time during which requests are being issued to and serviced by the partition.") m.data.SetUnit("1") m.data.SetEmptyGauge() } func (m *metricMongodbatlasDiskPartitionUtilizationAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionUtilizationAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionUtilizationAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionUtilizationAverage(cfg MetricConfig) metricMongodbatlasDiskPartitionUtilizationAverage { m := metricMongodbatlasDiskPartitionUtilizationAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasDiskPartitionUtilizationMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.disk.partition.utilization.max metric with initial data. func (m *metricMongodbatlasDiskPartitionUtilizationMax) init() { m.data.SetName("mongodbatlas.disk.partition.utilization.max") m.data.SetDescription("The maximum percentage of time during which requests are being issued to and serviced by the partition.") m.data.SetUnit("1") m.data.SetEmptyGauge() } func (m *metricMongodbatlasDiskPartitionUtilizationMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasDiskPartitionUtilizationMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasDiskPartitionUtilizationMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasDiskPartitionUtilizationMax(cfg MetricConfig) metricMongodbatlasDiskPartitionUtilizationMax { m := metricMongodbatlasDiskPartitionUtilizationMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessAsserts struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.asserts metric with initial data. func (m *metricMongodbatlasProcessAsserts) init() { m.data.SetName("mongodbatlas.process.asserts") m.data.SetDescription("Number of assertions per second") m.data.SetUnit("{assertions}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessAsserts) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, assertTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("assert_type", assertTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessAsserts) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessAsserts) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessAsserts(cfg MetricConfig) metricMongodbatlasProcessAsserts { m := metricMongodbatlasProcessAsserts{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessBackgroundFlush struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.background_flush metric with initial data. func (m *metricMongodbatlasProcessBackgroundFlush) init() { m.data.SetName("mongodbatlas.process.background_flush") m.data.SetDescription("Amount of data flushed in the background") m.data.SetUnit("1") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessBackgroundFlush) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessBackgroundFlush) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessBackgroundFlush) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessBackgroundFlush(cfg MetricConfig) metricMongodbatlasProcessBackgroundFlush { m := metricMongodbatlasProcessBackgroundFlush{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCacheIo struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cache.io metric with initial data. func (m *metricMongodbatlasProcessCacheIo) init() { m.data.SetName("mongodbatlas.process.cache.io") m.data.SetDescription("Cache throughput (per second)") m.data.SetUnit("By") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCacheIo) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cacheDirectionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cache_direction", cacheDirectionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCacheIo) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCacheIo) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCacheIo(cfg MetricConfig) metricMongodbatlasProcessCacheIo { m := metricMongodbatlasProcessCacheIo{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCacheRatio struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cache.ratio metric with initial data. func (m *metricMongodbatlasProcessCacheRatio) init() { m.data.SetName("mongodbatlas.process.cache.ratio") m.data.SetDescription("Cache ratios represented as (%)") m.data.SetUnit("%") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCacheRatio) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cacheRatioTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cache_ratio_type", cacheRatioTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCacheRatio) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCacheRatio) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCacheRatio(cfg MetricConfig) metricMongodbatlasProcessCacheRatio { m := metricMongodbatlasProcessCacheRatio{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCacheSize struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cache.size metric with initial data. func (m *metricMongodbatlasProcessCacheSize) init() { m.data.SetName("mongodbatlas.process.cache.size") m.data.SetDescription("Cache sizes") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) m.data.Sum().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCacheSize) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cacheStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Sum().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cache_status", cacheStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCacheSize) updateCapacity() { if m.data.Sum().DataPoints().Len() > m.capacity { m.capacity = m.data.Sum().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCacheSize) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCacheSize(cfg MetricConfig) metricMongodbatlasProcessCacheSize { m := metricMongodbatlasProcessCacheSize{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessConnections struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.connections metric with initial data. func (m *metricMongodbatlasProcessConnections) init() { m.data.SetName("mongodbatlas.process.connections") m.data.SetDescription("Number of current connections") m.data.SetUnit("{connections}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) } func (m *metricMongodbatlasProcessConnections) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Sum().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessConnections) updateCapacity() { if m.data.Sum().DataPoints().Len() > m.capacity { m.capacity = m.data.Sum().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessConnections) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessConnections(cfg MetricConfig) metricMongodbatlasProcessConnections { m := metricMongodbatlasProcessConnections{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.children.normalized.usage.average metric with initial data. func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage) init() { m.data.SetName("mongodbatlas.process.cpu.children.normalized.usage.average") m.data.SetDescription("CPU Usage for child processes, normalized to pct") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUChildrenNormalizedUsageAverage(cfg MetricConfig) metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage { m := metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUChildrenNormalizedUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.children.normalized.usage.max metric with initial data. func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageMax) init() { m.data.SetName("mongodbatlas.process.cpu.children.normalized.usage.max") m.data.SetDescription("CPU Usage for child processes, normalized to pct") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUChildrenNormalizedUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUChildrenNormalizedUsageMax(cfg MetricConfig) metricMongodbatlasProcessCPUChildrenNormalizedUsageMax { m := metricMongodbatlasProcessCPUChildrenNormalizedUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUChildrenUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.children.usage.average metric with initial data. func (m *metricMongodbatlasProcessCPUChildrenUsageAverage) init() { m.data.SetName("mongodbatlas.process.cpu.children.usage.average") m.data.SetDescription("CPU Usage for child processes (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUChildrenUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUChildrenUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUChildrenUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUChildrenUsageAverage(cfg MetricConfig) metricMongodbatlasProcessCPUChildrenUsageAverage { m := metricMongodbatlasProcessCPUChildrenUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUChildrenUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.children.usage.max metric with initial data. func (m *metricMongodbatlasProcessCPUChildrenUsageMax) init() { m.data.SetName("mongodbatlas.process.cpu.children.usage.max") m.data.SetDescription("CPU Usage for child processes (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUChildrenUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUChildrenUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUChildrenUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUChildrenUsageMax(cfg MetricConfig) metricMongodbatlasProcessCPUChildrenUsageMax { m := metricMongodbatlasProcessCPUChildrenUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUNormalizedUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.normalized.usage.average metric with initial data. func (m *metricMongodbatlasProcessCPUNormalizedUsageAverage) init() { m.data.SetName("mongodbatlas.process.cpu.normalized.usage.average") m.data.SetDescription("CPU Usage, normalized to pct") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUNormalizedUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUNormalizedUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUNormalizedUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUNormalizedUsageAverage(cfg MetricConfig) metricMongodbatlasProcessCPUNormalizedUsageAverage { m := metricMongodbatlasProcessCPUNormalizedUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUNormalizedUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.normalized.usage.max metric with initial data. func (m *metricMongodbatlasProcessCPUNormalizedUsageMax) init() { m.data.SetName("mongodbatlas.process.cpu.normalized.usage.max") m.data.SetDescription("CPU Usage, normalized to pct") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUNormalizedUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUNormalizedUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUNormalizedUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUNormalizedUsageMax(cfg MetricConfig) metricMongodbatlasProcessCPUNormalizedUsageMax { m := metricMongodbatlasProcessCPUNormalizedUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.usage.average metric with initial data. func (m *metricMongodbatlasProcessCPUUsageAverage) init() { m.data.SetName("mongodbatlas.process.cpu.usage.average") m.data.SetDescription("CPU Usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUUsageAverage(cfg MetricConfig) metricMongodbatlasProcessCPUUsageAverage { m := metricMongodbatlasProcessCPUUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCPUUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cpu.usage.max metric with initial data. func (m *metricMongodbatlasProcessCPUUsageMax) init() { m.data.SetName("mongodbatlas.process.cpu.usage.max") m.data.SetDescription("CPU Usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCPUUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCPUUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCPUUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCPUUsageMax(cfg MetricConfig) metricMongodbatlasProcessCPUUsageMax { m := metricMongodbatlasProcessCPUUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessCursors struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.cursors metric with initial data. func (m *metricMongodbatlasProcessCursors) init() { m.data.SetName("mongodbatlas.process.cursors") m.data.SetDescription("Number of cursors") m.data.SetUnit("{cursors}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessCursors) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cursorStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cursor_state", cursorStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessCursors) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessCursors) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessCursors(cfg MetricConfig) metricMongodbatlasProcessCursors { m := metricMongodbatlasProcessCursors{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessDbDocumentRate struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.db.document.rate metric with initial data. func (m *metricMongodbatlasProcessDbDocumentRate) init() { m.data.SetName("mongodbatlas.process.db.document.rate") m.data.SetDescription("Document access rates") m.data.SetUnit("{documents}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessDbDocumentRate) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, documentStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("document_status", documentStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessDbDocumentRate) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessDbDocumentRate) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessDbDocumentRate(cfg MetricConfig) metricMongodbatlasProcessDbDocumentRate { m := metricMongodbatlasProcessDbDocumentRate{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessDbOperationsRate struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.db.operations.rate metric with initial data. func (m *metricMongodbatlasProcessDbOperationsRate) init() { m.data.SetName("mongodbatlas.process.db.operations.rate") m.data.SetDescription("DB Operation Rates") m.data.SetUnit("{operations}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessDbOperationsRate) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, operationAttributeValue string, clusterRoleAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("operation", operationAttributeValue) dp.Attributes().PutStr("cluster_role", clusterRoleAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessDbOperationsRate) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessDbOperationsRate) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessDbOperationsRate(cfg MetricConfig) metricMongodbatlasProcessDbOperationsRate { m := metricMongodbatlasProcessDbOperationsRate{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessDbOperationsTime struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.db.operations.time metric with initial data. func (m *metricMongodbatlasProcessDbOperationsTime) init() { m.data.SetName("mongodbatlas.process.db.operations.time") m.data.SetDescription("DB Operation Times") m.data.SetUnit("ms") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) m.data.Sum().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessDbOperationsTime) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, executionTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Sum().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("execution_type", executionTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessDbOperationsTime) updateCapacity() { if m.data.Sum().DataPoints().Len() > m.capacity { m.capacity = m.data.Sum().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessDbOperationsTime) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessDbOperationsTime(cfg MetricConfig) metricMongodbatlasProcessDbOperationsTime { m := metricMongodbatlasProcessDbOperationsTime{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessDbQueryExecutorScanned struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.db.query_executor.scanned metric with initial data. func (m *metricMongodbatlasProcessDbQueryExecutorScanned) init() { m.data.SetName("mongodbatlas.process.db.query_executor.scanned") m.data.SetDescription("Scanned objects") m.data.SetUnit("{objects}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessDbQueryExecutorScanned) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, scannedTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("scanned_type", scannedTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessDbQueryExecutorScanned) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessDbQueryExecutorScanned) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessDbQueryExecutorScanned(cfg MetricConfig) metricMongodbatlasProcessDbQueryExecutorScanned { m := metricMongodbatlasProcessDbQueryExecutorScanned{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessDbQueryTargetingScannedPerReturned struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.db.query_targeting.scanned_per_returned metric with initial data. func (m *metricMongodbatlasProcessDbQueryTargetingScannedPerReturned) init() { m.data.SetName("mongodbatlas.process.db.query_targeting.scanned_per_returned") m.data.SetDescription("Scanned objects per returned") m.data.SetUnit("{scanned}/{returned}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessDbQueryTargetingScannedPerReturned) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, scannedTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("scanned_type", scannedTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessDbQueryTargetingScannedPerReturned) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessDbQueryTargetingScannedPerReturned) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessDbQueryTargetingScannedPerReturned(cfg MetricConfig) metricMongodbatlasProcessDbQueryTargetingScannedPerReturned { m := metricMongodbatlasProcessDbQueryTargetingScannedPerReturned{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessDbStorage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.db.storage metric with initial data. func (m *metricMongodbatlasProcessDbStorage) init() { m.data.SetName("mongodbatlas.process.db.storage") m.data.SetDescription("Storage used by the database") m.data.SetUnit("By") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessDbStorage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, storageStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("storage_status", storageStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessDbStorage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessDbStorage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessDbStorage(cfg MetricConfig) metricMongodbatlasProcessDbStorage { m := metricMongodbatlasProcessDbStorage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessGlobalLock struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.global_lock metric with initial data. func (m *metricMongodbatlasProcessGlobalLock) init() { m.data.SetName("mongodbatlas.process.global_lock") m.data.SetDescription("Number and status of locks") m.data.SetUnit("{locks}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessGlobalLock) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, globalLockStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("global_lock_state", globalLockStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessGlobalLock) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessGlobalLock) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessGlobalLock(cfg MetricConfig) metricMongodbatlasProcessGlobalLock { m := metricMongodbatlasProcessGlobalLock{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessIndexBtreeMissRatio struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.index.btree_miss_ratio metric with initial data. func (m *metricMongodbatlasProcessIndexBtreeMissRatio) init() { m.data.SetName("mongodbatlas.process.index.btree_miss_ratio") m.data.SetDescription("Index miss ratio (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessIndexBtreeMissRatio) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessIndexBtreeMissRatio) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessIndexBtreeMissRatio) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessIndexBtreeMissRatio(cfg MetricConfig) metricMongodbatlasProcessIndexBtreeMissRatio { m := metricMongodbatlasProcessIndexBtreeMissRatio{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessIndexCounters struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.index.counters metric with initial data. func (m *metricMongodbatlasProcessIndexCounters) init() { m.data.SetName("mongodbatlas.process.index.counters") m.data.SetDescription("Indexes") m.data.SetUnit("{indexes}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessIndexCounters) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, btreeCounterTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("btree_counter_type", btreeCounterTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessIndexCounters) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessIndexCounters) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessIndexCounters(cfg MetricConfig) metricMongodbatlasProcessIndexCounters { m := metricMongodbatlasProcessIndexCounters{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessJournalingCommits struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.journaling.commits metric with initial data. func (m *metricMongodbatlasProcessJournalingCommits) init() { m.data.SetName("mongodbatlas.process.journaling.commits") m.data.SetDescription("Journaling commits") m.data.SetUnit("{commits}") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessJournalingCommits) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessJournalingCommits) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessJournalingCommits) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessJournalingCommits(cfg MetricConfig) metricMongodbatlasProcessJournalingCommits { m := metricMongodbatlasProcessJournalingCommits{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessJournalingDataFiles struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.journaling.data_files metric with initial data. func (m *metricMongodbatlasProcessJournalingDataFiles) init() { m.data.SetName("mongodbatlas.process.journaling.data_files") m.data.SetDescription("Data file sizes") m.data.SetUnit("MiBy") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessJournalingDataFiles) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessJournalingDataFiles) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessJournalingDataFiles) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessJournalingDataFiles(cfg MetricConfig) metricMongodbatlasProcessJournalingDataFiles { m := metricMongodbatlasProcessJournalingDataFiles{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessJournalingWritten struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.journaling.written metric with initial data. func (m *metricMongodbatlasProcessJournalingWritten) init() { m.data.SetName("mongodbatlas.process.journaling.written") m.data.SetDescription("Journals written") m.data.SetUnit("MiBy") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessJournalingWritten) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessJournalingWritten) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessJournalingWritten) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessJournalingWritten(cfg MetricConfig) metricMongodbatlasProcessJournalingWritten { m := metricMongodbatlasProcessJournalingWritten{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessMemoryUsage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.memory.usage metric with initial data. func (m *metricMongodbatlasProcessMemoryUsage) init() { m.data.SetName("mongodbatlas.process.memory.usage") m.data.SetDescription("Memory Usage") m.data.SetUnit("By") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessMemoryUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_state", memoryStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessMemoryUsage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessMemoryUsage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessMemoryUsage(cfg MetricConfig) metricMongodbatlasProcessMemoryUsage { m := metricMongodbatlasProcessMemoryUsage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessNetworkIo struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.network.io metric with initial data. func (m *metricMongodbatlasProcessNetworkIo) init() { m.data.SetName("mongodbatlas.process.network.io") m.data.SetDescription("Network IO") m.data.SetUnit("By/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessNetworkIo) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, directionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("direction", directionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessNetworkIo) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessNetworkIo) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessNetworkIo(cfg MetricConfig) metricMongodbatlasProcessNetworkIo { m := metricMongodbatlasProcessNetworkIo{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessNetworkRequests struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.network.requests metric with initial data. func (m *metricMongodbatlasProcessNetworkRequests) init() { m.data.SetName("mongodbatlas.process.network.requests") m.data.SetDescription("Network requests") m.data.SetUnit("{requests}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) } func (m *metricMongodbatlasProcessNetworkRequests) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Sum().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessNetworkRequests) updateCapacity() { if m.data.Sum().DataPoints().Len() > m.capacity { m.capacity = m.data.Sum().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessNetworkRequests) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessNetworkRequests(cfg MetricConfig) metricMongodbatlasProcessNetworkRequests { m := metricMongodbatlasProcessNetworkRequests{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessOplogRate struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.oplog.rate metric with initial data. func (m *metricMongodbatlasProcessOplogRate) init() { m.data.SetName("mongodbatlas.process.oplog.rate") m.data.SetDescription("Execution rate by operation") m.data.SetUnit("GiBy/h") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessOplogRate) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessOplogRate) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessOplogRate) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessOplogRate(cfg MetricConfig) metricMongodbatlasProcessOplogRate { m := metricMongodbatlasProcessOplogRate{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessOplogTime struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.oplog.time metric with initial data. func (m *metricMongodbatlasProcessOplogTime) init() { m.data.SetName("mongodbatlas.process.oplog.time") m.data.SetDescription("Execution time by operation") m.data.SetUnit("s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessOplogTime) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, oplogTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("oplog_type", oplogTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessOplogTime) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessOplogTime) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessOplogTime(cfg MetricConfig) metricMongodbatlasProcessOplogTime { m := metricMongodbatlasProcessOplogTime{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessPageFaults struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.page_faults metric with initial data. func (m *metricMongodbatlasProcessPageFaults) init() { m.data.SetName("mongodbatlas.process.page_faults") m.data.SetDescription("Page faults") m.data.SetUnit("{faults}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessPageFaults) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryIssueTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_issue_type", memoryIssueTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessPageFaults) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessPageFaults) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessPageFaults(cfg MetricConfig) metricMongodbatlasProcessPageFaults { m := metricMongodbatlasProcessPageFaults{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessRestarts struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.restarts metric with initial data. func (m *metricMongodbatlasProcessRestarts) init() { m.data.SetName("mongodbatlas.process.restarts") m.data.SetDescription("Restarts in last hour") m.data.SetUnit("{restarts}/h") m.data.SetEmptyGauge() } func (m *metricMongodbatlasProcessRestarts) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessRestarts) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessRestarts) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessRestarts(cfg MetricConfig) metricMongodbatlasProcessRestarts { m := metricMongodbatlasProcessRestarts{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasProcessTickets struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.process.tickets metric with initial data. func (m *metricMongodbatlasProcessTickets) init() { m.data.SetName("mongodbatlas.process.tickets") m.data.SetDescription("Tickets") m.data.SetUnit("{tickets}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasProcessTickets) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, ticketTypeAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("ticket_type", ticketTypeAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasProcessTickets) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasProcessTickets) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasProcessTickets(cfg MetricConfig) metricMongodbatlasProcessTickets { m := metricMongodbatlasProcessTickets{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemCPUNormalizedUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.cpu.normalized.usage.average metric with initial data. func (m *metricMongodbatlasSystemCPUNormalizedUsageAverage) init() { m.data.SetName("mongodbatlas.system.cpu.normalized.usage.average") m.data.SetDescription("System CPU Normalized to pct") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemCPUNormalizedUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemCPUNormalizedUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemCPUNormalizedUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemCPUNormalizedUsageAverage(cfg MetricConfig) metricMongodbatlasSystemCPUNormalizedUsageAverage { m := metricMongodbatlasSystemCPUNormalizedUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemCPUNormalizedUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.cpu.normalized.usage.max metric with initial data. func (m *metricMongodbatlasSystemCPUNormalizedUsageMax) init() { m.data.SetName("mongodbatlas.system.cpu.normalized.usage.max") m.data.SetDescription("System CPU Normalized to pct") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemCPUNormalizedUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemCPUNormalizedUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemCPUNormalizedUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemCPUNormalizedUsageMax(cfg MetricConfig) metricMongodbatlasSystemCPUNormalizedUsageMax { m := metricMongodbatlasSystemCPUNormalizedUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemCPUUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.cpu.usage.average metric with initial data. func (m *metricMongodbatlasSystemCPUUsageAverage) init() { m.data.SetName("mongodbatlas.system.cpu.usage.average") m.data.SetDescription("System CPU Usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemCPUUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemCPUUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemCPUUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemCPUUsageAverage(cfg MetricConfig) metricMongodbatlasSystemCPUUsageAverage { m := metricMongodbatlasSystemCPUUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemCPUUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.cpu.usage.max metric with initial data. func (m *metricMongodbatlasSystemCPUUsageMax) init() { m.data.SetName("mongodbatlas.system.cpu.usage.max") m.data.SetDescription("System CPU Usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemCPUUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemCPUUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemCPUUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemCPUUsageMax(cfg MetricConfig) metricMongodbatlasSystemCPUUsageMax { m := metricMongodbatlasSystemCPUUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemFtsCPUNormalizedUsage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.fts.cpu.normalized.usage metric with initial data. func (m *metricMongodbatlasSystemFtsCPUNormalizedUsage) init() { m.data.SetName("mongodbatlas.system.fts.cpu.normalized.usage") m.data.SetDescription("Full text search disk usage (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemFtsCPUNormalizedUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemFtsCPUNormalizedUsage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemFtsCPUNormalizedUsage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemFtsCPUNormalizedUsage(cfg MetricConfig) metricMongodbatlasSystemFtsCPUNormalizedUsage { m := metricMongodbatlasSystemFtsCPUNormalizedUsage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemFtsCPUUsage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.fts.cpu.usage metric with initial data. func (m *metricMongodbatlasSystemFtsCPUUsage) init() { m.data.SetName("mongodbatlas.system.fts.cpu.usage") m.data.SetDescription("Full-text search (%)") m.data.SetUnit("1") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemFtsCPUUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, cpuStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("cpu_state", cpuStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemFtsCPUUsage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemFtsCPUUsage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemFtsCPUUsage(cfg MetricConfig) metricMongodbatlasSystemFtsCPUUsage { m := metricMongodbatlasSystemFtsCPUUsage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemFtsDiskUsed struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.fts.disk.used metric with initial data. func (m *metricMongodbatlasSystemFtsDiskUsed) init() { m.data.SetName("mongodbatlas.system.fts.disk.used") m.data.SetDescription("Full text search disk usage") m.data.SetUnit("By") m.data.SetEmptyGauge() } func (m *metricMongodbatlasSystemFtsDiskUsed) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemFtsDiskUsed) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemFtsDiskUsed) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemFtsDiskUsed(cfg MetricConfig) metricMongodbatlasSystemFtsDiskUsed { m := metricMongodbatlasSystemFtsDiskUsed{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemFtsMemoryUsage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.fts.memory.usage metric with initial data. func (m *metricMongodbatlasSystemFtsMemoryUsage) init() { m.data.SetName("mongodbatlas.system.fts.memory.usage") m.data.SetDescription("Full-text search") m.data.SetUnit("MiBy") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) m.data.Sum().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemFtsMemoryUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Sum().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_state", memoryStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemFtsMemoryUsage) updateCapacity() { if m.data.Sum().DataPoints().Len() > m.capacity { m.capacity = m.data.Sum().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemFtsMemoryUsage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemFtsMemoryUsage(cfg MetricConfig) metricMongodbatlasSystemFtsMemoryUsage { m := metricMongodbatlasSystemFtsMemoryUsage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemMemoryUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.memory.usage.average metric with initial data. func (m *metricMongodbatlasSystemMemoryUsageAverage) init() { m.data.SetName("mongodbatlas.system.memory.usage.average") m.data.SetDescription("System Memory Usage") m.data.SetUnit("KiBy") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemMemoryUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_status", memoryStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemMemoryUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemMemoryUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemMemoryUsageAverage(cfg MetricConfig) metricMongodbatlasSystemMemoryUsageAverage { m := metricMongodbatlasSystemMemoryUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemMemoryUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.memory.usage.max metric with initial data. func (m *metricMongodbatlasSystemMemoryUsageMax) init() { m.data.SetName("mongodbatlas.system.memory.usage.max") m.data.SetDescription("System Memory Usage") m.data.SetUnit("KiBy") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemMemoryUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryStatusAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_status", memoryStatusAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemMemoryUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemMemoryUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemMemoryUsageMax(cfg MetricConfig) metricMongodbatlasSystemMemoryUsageMax { m := metricMongodbatlasSystemMemoryUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemNetworkIoAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.network.io.average metric with initial data. func (m *metricMongodbatlasSystemNetworkIoAverage) init() { m.data.SetName("mongodbatlas.system.network.io.average") m.data.SetDescription("System Network IO") m.data.SetUnit("By/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemNetworkIoAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, directionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("direction", directionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemNetworkIoAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemNetworkIoAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemNetworkIoAverage(cfg MetricConfig) metricMongodbatlasSystemNetworkIoAverage { m := metricMongodbatlasSystemNetworkIoAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemNetworkIoMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.network.io.max metric with initial data. func (m *metricMongodbatlasSystemNetworkIoMax) init() { m.data.SetName("mongodbatlas.system.network.io.max") m.data.SetDescription("System Network IO") m.data.SetUnit("By/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemNetworkIoMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, directionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("direction", directionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemNetworkIoMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemNetworkIoMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemNetworkIoMax(cfg MetricConfig) metricMongodbatlasSystemNetworkIoMax { m := metricMongodbatlasSystemNetworkIoMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemPagingIoAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.paging.io.average metric with initial data. func (m *metricMongodbatlasSystemPagingIoAverage) init() { m.data.SetName("mongodbatlas.system.paging.io.average") m.data.SetDescription("Swap IO") m.data.SetUnit("{pages}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemPagingIoAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, directionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("direction", directionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemPagingIoAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemPagingIoAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemPagingIoAverage(cfg MetricConfig) metricMongodbatlasSystemPagingIoAverage { m := metricMongodbatlasSystemPagingIoAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemPagingIoMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.paging.io.max metric with initial data. func (m *metricMongodbatlasSystemPagingIoMax) init() { m.data.SetName("mongodbatlas.system.paging.io.max") m.data.SetDescription("Swap IO") m.data.SetUnit("{pages}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemPagingIoMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, directionAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("direction", directionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemPagingIoMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemPagingIoMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemPagingIoMax(cfg MetricConfig) metricMongodbatlasSystemPagingIoMax { m := metricMongodbatlasSystemPagingIoMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemPagingUsageAverage struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.paging.usage.average metric with initial data. func (m *metricMongodbatlasSystemPagingUsageAverage) init() { m.data.SetName("mongodbatlas.system.paging.usage.average") m.data.SetDescription("Swap usage") m.data.SetUnit("KiBy") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemPagingUsageAverage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_state", memoryStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemPagingUsageAverage) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemPagingUsageAverage) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemPagingUsageAverage(cfg MetricConfig) metricMongodbatlasSystemPagingUsageAverage { m := metricMongodbatlasSystemPagingUsageAverage{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } type metricMongodbatlasSystemPagingUsageMax struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } // init fills mongodbatlas.system.paging.usage.max metric with initial data. func (m *metricMongodbatlasSystemPagingUsageMax) init() { m.data.SetName("mongodbatlas.system.paging.usage.max") m.data.SetDescription("Swap usage") m.data.SetUnit("KiBy") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } func (m *metricMongodbatlasSystemPagingUsageMax) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, memoryStateAttributeValue string) { if !m.config.Enabled { return } dp := m.data.Gauge().DataPoints().AppendEmpty() dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetDoubleValue(val) dp.Attributes().PutStr("memory_state", memoryStateAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. func (m *metricMongodbatlasSystemPagingUsageMax) updateCapacity() { if m.data.Gauge().DataPoints().Len() > m.capacity { m.capacity = m.data.Gauge().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. func (m *metricMongodbatlasSystemPagingUsageMax) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Gauge().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) m.init() } } func newMetricMongodbatlasSystemPagingUsageMax(cfg MetricConfig) metricMongodbatlasSystemPagingUsageMax { m := metricMongodbatlasSystemPagingUsageMax{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() } return m } // 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. type MetricsBuilder struct { config MetricsBuilderConfig // config of the metrics builder. startTime pcommon.Timestamp // start time that will be applied to all recorded data points. metricsCapacity int // maximum observed number of metrics per resource. metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. buildInfo component.BuildInfo // contains version information. resourceAttributeIncludeFilter map[string]filter.Filter resourceAttributeExcludeFilter map[string]filter.Filter metricMongodbatlasDbCounts metricMongodbatlasDbCounts metricMongodbatlasDbSize metricMongodbatlasDbSize metricMongodbatlasDiskPartitionIopsAverage metricMongodbatlasDiskPartitionIopsAverage metricMongodbatlasDiskPartitionIopsMax metricMongodbatlasDiskPartitionIopsMax metricMongodbatlasDiskPartitionLatencyAverage metricMongodbatlasDiskPartitionLatencyAverage metricMongodbatlasDiskPartitionLatencyMax metricMongodbatlasDiskPartitionLatencyMax metricMongodbatlasDiskPartitionQueueDepth metricMongodbatlasDiskPartitionQueueDepth metricMongodbatlasDiskPartitionSpaceAverage metricMongodbatlasDiskPartitionSpaceAverage metricMongodbatlasDiskPartitionSpaceMax metricMongodbatlasDiskPartitionSpaceMax metricMongodbatlasDiskPartitionThroughput metricMongodbatlasDiskPartitionThroughput metricMongodbatlasDiskPartitionUsageAverage metricMongodbatlasDiskPartitionUsageAverage metricMongodbatlasDiskPartitionUsageMax metricMongodbatlasDiskPartitionUsageMax metricMongodbatlasDiskPartitionUtilizationAverage metricMongodbatlasDiskPartitionUtilizationAverage metricMongodbatlasDiskPartitionUtilizationMax metricMongodbatlasDiskPartitionUtilizationMax metricMongodbatlasProcessAsserts metricMongodbatlasProcessAsserts metricMongodbatlasProcessBackgroundFlush metricMongodbatlasProcessBackgroundFlush metricMongodbatlasProcessCacheIo metricMongodbatlasProcessCacheIo metricMongodbatlasProcessCacheRatio metricMongodbatlasProcessCacheRatio metricMongodbatlasProcessCacheSize metricMongodbatlasProcessCacheSize metricMongodbatlasProcessConnections metricMongodbatlasProcessConnections metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage metricMongodbatlasProcessCPUChildrenNormalizedUsageMax metricMongodbatlasProcessCPUChildrenNormalizedUsageMax metricMongodbatlasProcessCPUChildrenUsageAverage metricMongodbatlasProcessCPUChildrenUsageAverage metricMongodbatlasProcessCPUChildrenUsageMax metricMongodbatlasProcessCPUChildrenUsageMax metricMongodbatlasProcessCPUNormalizedUsageAverage metricMongodbatlasProcessCPUNormalizedUsageAverage metricMongodbatlasProcessCPUNormalizedUsageMax metricMongodbatlasProcessCPUNormalizedUsageMax metricMongodbatlasProcessCPUUsageAverage metricMongodbatlasProcessCPUUsageAverage metricMongodbatlasProcessCPUUsageMax metricMongodbatlasProcessCPUUsageMax metricMongodbatlasProcessCursors metricMongodbatlasProcessCursors metricMongodbatlasProcessDbDocumentRate metricMongodbatlasProcessDbDocumentRate metricMongodbatlasProcessDbOperationsRate metricMongodbatlasProcessDbOperationsRate metricMongodbatlasProcessDbOperationsTime metricMongodbatlasProcessDbOperationsTime metricMongodbatlasProcessDbQueryExecutorScanned metricMongodbatlasProcessDbQueryExecutorScanned metricMongodbatlasProcessDbQueryTargetingScannedPerReturned metricMongodbatlasProcessDbQueryTargetingScannedPerReturned metricMongodbatlasProcessDbStorage metricMongodbatlasProcessDbStorage metricMongodbatlasProcessGlobalLock metricMongodbatlasProcessGlobalLock metricMongodbatlasProcessIndexBtreeMissRatio metricMongodbatlasProcessIndexBtreeMissRatio metricMongodbatlasProcessIndexCounters metricMongodbatlasProcessIndexCounters metricMongodbatlasProcessJournalingCommits metricMongodbatlasProcessJournalingCommits metricMongodbatlasProcessJournalingDataFiles metricMongodbatlasProcessJournalingDataFiles metricMongodbatlasProcessJournalingWritten metricMongodbatlasProcessJournalingWritten metricMongodbatlasProcessMemoryUsage metricMongodbatlasProcessMemoryUsage metricMongodbatlasProcessNetworkIo metricMongodbatlasProcessNetworkIo metricMongodbatlasProcessNetworkRequests metricMongodbatlasProcessNetworkRequests metricMongodbatlasProcessOplogRate metricMongodbatlasProcessOplogRate metricMongodbatlasProcessOplogTime metricMongodbatlasProcessOplogTime metricMongodbatlasProcessPageFaults metricMongodbatlasProcessPageFaults metricMongodbatlasProcessRestarts metricMongodbatlasProcessRestarts metricMongodbatlasProcessTickets metricMongodbatlasProcessTickets metricMongodbatlasSystemCPUNormalizedUsageAverage metricMongodbatlasSystemCPUNormalizedUsageAverage metricMongodbatlasSystemCPUNormalizedUsageMax metricMongodbatlasSystemCPUNormalizedUsageMax metricMongodbatlasSystemCPUUsageAverage metricMongodbatlasSystemCPUUsageAverage metricMongodbatlasSystemCPUUsageMax metricMongodbatlasSystemCPUUsageMax metricMongodbatlasSystemFtsCPUNormalizedUsage metricMongodbatlasSystemFtsCPUNormalizedUsage metricMongodbatlasSystemFtsCPUUsage metricMongodbatlasSystemFtsCPUUsage metricMongodbatlasSystemFtsDiskUsed metricMongodbatlasSystemFtsDiskUsed metricMongodbatlasSystemFtsMemoryUsage metricMongodbatlasSystemFtsMemoryUsage metricMongodbatlasSystemMemoryUsageAverage metricMongodbatlasSystemMemoryUsageAverage metricMongodbatlasSystemMemoryUsageMax metricMongodbatlasSystemMemoryUsageMax metricMongodbatlasSystemNetworkIoAverage metricMongodbatlasSystemNetworkIoAverage metricMongodbatlasSystemNetworkIoMax metricMongodbatlasSystemNetworkIoMax metricMongodbatlasSystemPagingIoAverage metricMongodbatlasSystemPagingIoAverage metricMongodbatlasSystemPagingIoMax metricMongodbatlasSystemPagingIoMax metricMongodbatlasSystemPagingUsageAverage metricMongodbatlasSystemPagingUsageAverage metricMongodbatlasSystemPagingUsageMax metricMongodbatlasSystemPagingUsageMax } // MetricBuilderOption applies changes to default metrics builder. type MetricBuilderOption interface { apply(*MetricsBuilder) } type metricBuilderOptionFunc func(mb *MetricsBuilder) func (mbof metricBuilderOptionFunc) apply(mb *MetricsBuilder) { mbof(mb) } // WithStartTime sets startTime on the metrics builder. func WithStartTime(startTime pcommon.Timestamp) MetricBuilderOption { return metricBuilderOptionFunc(func(mb *MetricsBuilder) { mb.startTime = startTime }) } func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, options ...MetricBuilderOption) *MetricsBuilder { mb := &MetricsBuilder{ config: mbc, startTime: pcommon.NewTimestampFromTime(time.Now()), metricsBuffer: pmetric.NewMetrics(), buildInfo: settings.BuildInfo, metricMongodbatlasDbCounts: newMetricMongodbatlasDbCounts(mbc.Metrics.MongodbatlasDbCounts), metricMongodbatlasDbSize: newMetricMongodbatlasDbSize(mbc.Metrics.MongodbatlasDbSize), metricMongodbatlasDiskPartitionIopsAverage: newMetricMongodbatlasDiskPartitionIopsAverage(mbc.Metrics.MongodbatlasDiskPartitionIopsAverage), metricMongodbatlasDiskPartitionIopsMax: newMetricMongodbatlasDiskPartitionIopsMax(mbc.Metrics.MongodbatlasDiskPartitionIopsMax), metricMongodbatlasDiskPartitionLatencyAverage: newMetricMongodbatlasDiskPartitionLatencyAverage(mbc.Metrics.MongodbatlasDiskPartitionLatencyAverage), metricMongodbatlasDiskPartitionLatencyMax: newMetricMongodbatlasDiskPartitionLatencyMax(mbc.Metrics.MongodbatlasDiskPartitionLatencyMax), metricMongodbatlasDiskPartitionQueueDepth: newMetricMongodbatlasDiskPartitionQueueDepth(mbc.Metrics.MongodbatlasDiskPartitionQueueDepth), metricMongodbatlasDiskPartitionSpaceAverage: newMetricMongodbatlasDiskPartitionSpaceAverage(mbc.Metrics.MongodbatlasDiskPartitionSpaceAverage), metricMongodbatlasDiskPartitionSpaceMax: newMetricMongodbatlasDiskPartitionSpaceMax(mbc.Metrics.MongodbatlasDiskPartitionSpaceMax), metricMongodbatlasDiskPartitionThroughput: newMetricMongodbatlasDiskPartitionThroughput(mbc.Metrics.MongodbatlasDiskPartitionThroughput), metricMongodbatlasDiskPartitionUsageAverage: newMetricMongodbatlasDiskPartitionUsageAverage(mbc.Metrics.MongodbatlasDiskPartitionUsageAverage), metricMongodbatlasDiskPartitionUsageMax: newMetricMongodbatlasDiskPartitionUsageMax(mbc.Metrics.MongodbatlasDiskPartitionUsageMax), metricMongodbatlasDiskPartitionUtilizationAverage: newMetricMongodbatlasDiskPartitionUtilizationAverage(mbc.Metrics.MongodbatlasDiskPartitionUtilizationAverage), metricMongodbatlasDiskPartitionUtilizationMax: newMetricMongodbatlasDiskPartitionUtilizationMax(mbc.Metrics.MongodbatlasDiskPartitionUtilizationMax), metricMongodbatlasProcessAsserts: newMetricMongodbatlasProcessAsserts(mbc.Metrics.MongodbatlasProcessAsserts), metricMongodbatlasProcessBackgroundFlush: newMetricMongodbatlasProcessBackgroundFlush(mbc.Metrics.MongodbatlasProcessBackgroundFlush), metricMongodbatlasProcessCacheIo: newMetricMongodbatlasProcessCacheIo(mbc.Metrics.MongodbatlasProcessCacheIo), metricMongodbatlasProcessCacheRatio: newMetricMongodbatlasProcessCacheRatio(mbc.Metrics.MongodbatlasProcessCacheRatio), metricMongodbatlasProcessCacheSize: newMetricMongodbatlasProcessCacheSize(mbc.Metrics.MongodbatlasProcessCacheSize), metricMongodbatlasProcessConnections: newMetricMongodbatlasProcessConnections(mbc.Metrics.MongodbatlasProcessConnections), metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage: newMetricMongodbatlasProcessCPUChildrenNormalizedUsageAverage(mbc.Metrics.MongodbatlasProcessCPUChildrenNormalizedUsageAverage), metricMongodbatlasProcessCPUChildrenNormalizedUsageMax: newMetricMongodbatlasProcessCPUChildrenNormalizedUsageMax(mbc.Metrics.MongodbatlasProcessCPUChildrenNormalizedUsageMax), metricMongodbatlasProcessCPUChildrenUsageAverage: newMetricMongodbatlasProcessCPUChildrenUsageAverage(mbc.Metrics.MongodbatlasProcessCPUChildrenUsageAverage), metricMongodbatlasProcessCPUChildrenUsageMax: newMetricMongodbatlasProcessCPUChildrenUsageMax(mbc.Metrics.MongodbatlasProcessCPUChildrenUsageMax), metricMongodbatlasProcessCPUNormalizedUsageAverage: newMetricMongodbatlasProcessCPUNormalizedUsageAverage(mbc.Metrics.MongodbatlasProcessCPUNormalizedUsageAverage), metricMongodbatlasProcessCPUNormalizedUsageMax: newMetricMongodbatlasProcessCPUNormalizedUsageMax(mbc.Metrics.MongodbatlasProcessCPUNormalizedUsageMax), metricMongodbatlasProcessCPUUsageAverage: newMetricMongodbatlasProcessCPUUsageAverage(mbc.Metrics.MongodbatlasProcessCPUUsageAverage), metricMongodbatlasProcessCPUUsageMax: newMetricMongodbatlasProcessCPUUsageMax(mbc.Metrics.MongodbatlasProcessCPUUsageMax), metricMongodbatlasProcessCursors: newMetricMongodbatlasProcessCursors(mbc.Metrics.MongodbatlasProcessCursors), metricMongodbatlasProcessDbDocumentRate: newMetricMongodbatlasProcessDbDocumentRate(mbc.Metrics.MongodbatlasProcessDbDocumentRate), metricMongodbatlasProcessDbOperationsRate: newMetricMongodbatlasProcessDbOperationsRate(mbc.Metrics.MongodbatlasProcessDbOperationsRate), metricMongodbatlasProcessDbOperationsTime: newMetricMongodbatlasProcessDbOperationsTime(mbc.Metrics.MongodbatlasProcessDbOperationsTime), metricMongodbatlasProcessDbQueryExecutorScanned: newMetricMongodbatlasProcessDbQueryExecutorScanned(mbc.Metrics.MongodbatlasProcessDbQueryExecutorScanned), metricMongodbatlasProcessDbQueryTargetingScannedPerReturned: newMetricMongodbatlasProcessDbQueryTargetingScannedPerReturned(mbc.Metrics.MongodbatlasProcessDbQueryTargetingScannedPerReturned), metricMongodbatlasProcessDbStorage: newMetricMongodbatlasProcessDbStorage(mbc.Metrics.MongodbatlasProcessDbStorage), metricMongodbatlasProcessGlobalLock: newMetricMongodbatlasProcessGlobalLock(mbc.Metrics.MongodbatlasProcessGlobalLock), metricMongodbatlasProcessIndexBtreeMissRatio: newMetricMongodbatlasProcessIndexBtreeMissRatio(mbc.Metrics.MongodbatlasProcessIndexBtreeMissRatio), metricMongodbatlasProcessIndexCounters: newMetricMongodbatlasProcessIndexCounters(mbc.Metrics.MongodbatlasProcessIndexCounters), metricMongodbatlasProcessJournalingCommits: newMetricMongodbatlasProcessJournalingCommits(mbc.Metrics.MongodbatlasProcessJournalingCommits), metricMongodbatlasProcessJournalingDataFiles: newMetricMongodbatlasProcessJournalingDataFiles(mbc.Metrics.MongodbatlasProcessJournalingDataFiles), metricMongodbatlasProcessJournalingWritten: newMetricMongodbatlasProcessJournalingWritten(mbc.Metrics.MongodbatlasProcessJournalingWritten), metricMongodbatlasProcessMemoryUsage: newMetricMongodbatlasProcessMemoryUsage(mbc.Metrics.MongodbatlasProcessMemoryUsage), metricMongodbatlasProcessNetworkIo: newMetricMongodbatlasProcessNetworkIo(mbc.Metrics.MongodbatlasProcessNetworkIo), metricMongodbatlasProcessNetworkRequests: newMetricMongodbatlasProcessNetworkRequests(mbc.Metrics.MongodbatlasProcessNetworkRequests), metricMongodbatlasProcessOplogRate: newMetricMongodbatlasProcessOplogRate(mbc.Metrics.MongodbatlasProcessOplogRate), metricMongodbatlasProcessOplogTime: newMetricMongodbatlasProcessOplogTime(mbc.Metrics.MongodbatlasProcessOplogTime), metricMongodbatlasProcessPageFaults: newMetricMongodbatlasProcessPageFaults(mbc.Metrics.MongodbatlasProcessPageFaults), metricMongodbatlasProcessRestarts: newMetricMongodbatlasProcessRestarts(mbc.Metrics.MongodbatlasProcessRestarts), metricMongodbatlasProcessTickets: newMetricMongodbatlasProcessTickets(mbc.Metrics.MongodbatlasProcessTickets), metricMongodbatlasSystemCPUNormalizedUsageAverage: newMetricMongodbatlasSystemCPUNormalizedUsageAverage(mbc.Metrics.MongodbatlasSystemCPUNormalizedUsageAverage), metricMongodbatlasSystemCPUNormalizedUsageMax: newMetricMongodbatlasSystemCPUNormalizedUsageMax(mbc.Metrics.MongodbatlasSystemCPUNormalizedUsageMax), metricMongodbatlasSystemCPUUsageAverage: newMetricMongodbatlasSystemCPUUsageAverage(mbc.Metrics.MongodbatlasSystemCPUUsageAverage), metricMongodbatlasSystemCPUUsageMax: newMetricMongodbatlasSystemCPUUsageMax(mbc.Metrics.MongodbatlasSystemCPUUsageMax), metricMongodbatlasSystemFtsCPUNormalizedUsage: newMetricMongodbatlasSystemFtsCPUNormalizedUsage(mbc.Metrics.MongodbatlasSystemFtsCPUNormalizedUsage), metricMongodbatlasSystemFtsCPUUsage: newMetricMongodbatlasSystemFtsCPUUsage(mbc.Metrics.MongodbatlasSystemFtsCPUUsage), metricMongodbatlasSystemFtsDiskUsed: newMetricMongodbatlasSystemFtsDiskUsed(mbc.Metrics.MongodbatlasSystemFtsDiskUsed), metricMongodbatlasSystemFtsMemoryUsage: newMetricMongodbatlasSystemFtsMemoryUsage(mbc.Metrics.MongodbatlasSystemFtsMemoryUsage), metricMongodbatlasSystemMemoryUsageAverage: newMetricMongodbatlasSystemMemoryUsageAverage(mbc.Metrics.MongodbatlasSystemMemoryUsageAverage), metricMongodbatlasSystemMemoryUsageMax: newMetricMongodbatlasSystemMemoryUsageMax(mbc.Metrics.MongodbatlasSystemMemoryUsageMax), metricMongodbatlasSystemNetworkIoAverage: newMetricMongodbatlasSystemNetworkIoAverage(mbc.Metrics.MongodbatlasSystemNetworkIoAverage), metricMongodbatlasSystemNetworkIoMax: newMetricMongodbatlasSystemNetworkIoMax(mbc.Metrics.MongodbatlasSystemNetworkIoMax), metricMongodbatlasSystemPagingIoAverage: newMetricMongodbatlasSystemPagingIoAverage(mbc.Metrics.MongodbatlasSystemPagingIoAverage), metricMongodbatlasSystemPagingIoMax: newMetricMongodbatlasSystemPagingIoMax(mbc.Metrics.MongodbatlasSystemPagingIoMax), metricMongodbatlasSystemPagingUsageAverage: newMetricMongodbatlasSystemPagingUsageAverage(mbc.Metrics.MongodbatlasSystemPagingUsageAverage), metricMongodbatlasSystemPagingUsageMax: newMetricMongodbatlasSystemPagingUsageMax(mbc.Metrics.MongodbatlasSystemPagingUsageMax), resourceAttributeIncludeFilter: make(map[string]filter.Filter), resourceAttributeExcludeFilter: make(map[string]filter.Filter), } if mbc.ResourceAttributes.MongodbAtlasClusterName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.cluster.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasClusterName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasClusterName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.cluster.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasClusterName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasDbName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.db.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasDbName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasDbName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.db.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasDbName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasDiskPartition.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.disk.partition"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasDiskPartition.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasDiskPartition.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.disk.partition"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasDiskPartition.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasHostName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.host.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasHostName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasHostName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.host.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasHostName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasOrgName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.org_name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasOrgName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasOrgName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.org_name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasOrgName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasProcessID.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.process.id"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProcessID.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasProcessID.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.process.id"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProcessID.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasProcessPort.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.process.port"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProcessPort.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasProcessPort.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.process.port"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProcessPort.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasProcessTypeName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.process.type_name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProcessTypeName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasProcessTypeName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.process.type_name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProcessTypeName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasProjectID.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.project.id"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProjectID.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasProjectID.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.project.id"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProjectID.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasProjectName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.project.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProjectName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasProjectName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.project.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProjectName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasProviderName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.provider.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProviderName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasProviderName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.provider.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasProviderName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasRegionName.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.region.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasRegionName.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasRegionName.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.region.name"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasRegionName.MetricsExclude) } if mbc.ResourceAttributes.MongodbAtlasUserAlias.MetricsInclude != nil { mb.resourceAttributeIncludeFilter["mongodb_atlas.user.alias"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasUserAlias.MetricsInclude) } if mbc.ResourceAttributes.MongodbAtlasUserAlias.MetricsExclude != nil { mb.resourceAttributeExcludeFilter["mongodb_atlas.user.alias"] = filter.CreateFilter(mbc.ResourceAttributes.MongodbAtlasUserAlias.MetricsExclude) } for _, op := range options { op.apply(mb) } return mb } // NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics. func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder { return NewResourceBuilder(mb.config.ResourceAttributes) } // updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() } } // ResourceMetricsOption applies changes to provided resource metrics. type ResourceMetricsOption interface { apply(pmetric.ResourceMetrics) } type resourceMetricsOptionFunc func(pmetric.ResourceMetrics) func (rmof resourceMetricsOptionFunc) apply(rm pmetric.ResourceMetrics) { rmof(rm) } // WithResource sets the provided resource on the emitted ResourceMetrics. // It's recommended to use ResourceBuilder to create the resource. func WithResource(res pcommon.Resource) ResourceMetricsOption { return resourceMetricsOptionFunc(func(rm pmetric.ResourceMetrics) { res.CopyTo(rm.Resource()) }) } // 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. func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { return resourceMetricsOptionFunc(func(rm pmetric.ResourceMetrics) { var dps pmetric.NumberDataPointSlice metrics := rm.ScopeMetrics().At(0).Metrics() for i := 0; i < metrics.Len(); i++ { switch metrics.At(i).Type() { case pmetric.MetricTypeGauge: dps = metrics.At(i).Gauge().DataPoints() case pmetric.MetricTypeSum: dps = metrics.At(i).Sum().DataPoints() } for j := 0; j < dps.Len(); j++ { dps.At(j).SetStartTimestamp(start) } } }) } // 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 (mb *MetricsBuilder) EmitForResource(options ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() ils := rm.ScopeMetrics().AppendEmpty() ils.Scope().SetName(ScopeName) ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricMongodbatlasDbCounts.emit(ils.Metrics()) mb.metricMongodbatlasDbSize.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionIopsAverage.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionIopsMax.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionLatencyAverage.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionLatencyMax.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionQueueDepth.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionSpaceAverage.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionSpaceMax.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionThroughput.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionUtilizationAverage.emit(ils.Metrics()) mb.metricMongodbatlasDiskPartitionUtilizationMax.emit(ils.Metrics()) mb.metricMongodbatlasProcessAsserts.emit(ils.Metrics()) mb.metricMongodbatlasProcessBackgroundFlush.emit(ils.Metrics()) mb.metricMongodbatlasProcessCacheIo.emit(ils.Metrics()) mb.metricMongodbatlasProcessCacheRatio.emit(ils.Metrics()) mb.metricMongodbatlasProcessCacheSize.emit(ils.Metrics()) mb.metricMongodbatlasProcessConnections.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUChildrenNormalizedUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUChildrenUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUChildrenUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUNormalizedUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUNormalizedUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasProcessCPUUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasProcessCursors.emit(ils.Metrics()) mb.metricMongodbatlasProcessDbDocumentRate.emit(ils.Metrics()) mb.metricMongodbatlasProcessDbOperationsRate.emit(ils.Metrics()) mb.metricMongodbatlasProcessDbOperationsTime.emit(ils.Metrics()) mb.metricMongodbatlasProcessDbQueryExecutorScanned.emit(ils.Metrics()) mb.metricMongodbatlasProcessDbQueryTargetingScannedPerReturned.emit(ils.Metrics()) mb.metricMongodbatlasProcessDbStorage.emit(ils.Metrics()) mb.metricMongodbatlasProcessGlobalLock.emit(ils.Metrics()) mb.metricMongodbatlasProcessIndexBtreeMissRatio.emit(ils.Metrics()) mb.metricMongodbatlasProcessIndexCounters.emit(ils.Metrics()) mb.metricMongodbatlasProcessJournalingCommits.emit(ils.Metrics()) mb.metricMongodbatlasProcessJournalingDataFiles.emit(ils.Metrics()) mb.metricMongodbatlasProcessJournalingWritten.emit(ils.Metrics()) mb.metricMongodbatlasProcessMemoryUsage.emit(ils.Metrics()) mb.metricMongodbatlasProcessNetworkIo.emit(ils.Metrics()) mb.metricMongodbatlasProcessNetworkRequests.emit(ils.Metrics()) mb.metricMongodbatlasProcessOplogRate.emit(ils.Metrics()) mb.metricMongodbatlasProcessOplogTime.emit(ils.Metrics()) mb.metricMongodbatlasProcessPageFaults.emit(ils.Metrics()) mb.metricMongodbatlasProcessRestarts.emit(ils.Metrics()) mb.metricMongodbatlasProcessTickets.emit(ils.Metrics()) mb.metricMongodbatlasSystemCPUNormalizedUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasSystemCPUNormalizedUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasSystemCPUUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasSystemCPUUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasSystemFtsCPUNormalizedUsage.emit(ils.Metrics()) mb.metricMongodbatlasSystemFtsCPUUsage.emit(ils.Metrics()) mb.metricMongodbatlasSystemFtsDiskUsed.emit(ils.Metrics()) mb.metricMongodbatlasSystemFtsMemoryUsage.emit(ils.Metrics()) mb.metricMongodbatlasSystemMemoryUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasSystemMemoryUsageMax.emit(ils.Metrics()) mb.metricMongodbatlasSystemNetworkIoAverage.emit(ils.Metrics()) mb.metricMongodbatlasSystemNetworkIoMax.emit(ils.Metrics()) mb.metricMongodbatlasSystemPagingIoAverage.emit(ils.Metrics()) mb.metricMongodbatlasSystemPagingIoMax.emit(ils.Metrics()) mb.metricMongodbatlasSystemPagingUsageAverage.emit(ils.Metrics()) mb.metricMongodbatlasSystemPagingUsageMax.emit(ils.Metrics()) for _, op := range options { op.apply(rm) } for attr, filter := range mb.resourceAttributeIncludeFilter { if val, ok := rm.Resource().Attributes().Get(attr); ok && !filter.Matches(val.AsString()) { return } } for attr, filter := range mb.resourceAttributeExcludeFilter { if val, ok := rm.Resource().Attributes().Get(attr); ok && filter.Matches(val.AsString()) { return } } if ils.Metrics().Len() > 0 { mb.updateCapacity(rm) rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) } } // 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 (mb *MetricsBuilder) Emit(options ...ResourceMetricsOption) pmetric.Metrics { mb.EmitForResource(options...) metrics := mb.metricsBuffer mb.metricsBuffer = pmetric.NewMetrics() return metrics } // RecordMongodbatlasDbCountsDataPoint adds a data point to mongodbatlas.db.counts metric. func (mb *MetricsBuilder) RecordMongodbatlasDbCountsDataPoint(ts pcommon.Timestamp, val float64, objectTypeAttributeValue AttributeObjectType) { mb.metricMongodbatlasDbCounts.recordDataPoint(mb.startTime, ts, val, objectTypeAttributeValue.String()) } // RecordMongodbatlasDbSizeDataPoint adds a data point to mongodbatlas.db.size metric. func (mb *MetricsBuilder) RecordMongodbatlasDbSizeDataPoint(ts pcommon.Timestamp, val float64, objectTypeAttributeValue AttributeObjectType) { mb.metricMongodbatlasDbSize.recordDataPoint(mb.startTime, ts, val, objectTypeAttributeValue.String()) } // RecordMongodbatlasDiskPartitionIopsAverageDataPoint adds a data point to mongodbatlas.disk.partition.iops.average metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionIopsAverageDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection) { mb.metricMongodbatlasDiskPartitionIopsAverage.recordDataPoint(mb.startTime, ts, val, diskDirectionAttributeValue.String()) } // RecordMongodbatlasDiskPartitionIopsMaxDataPoint adds a data point to mongodbatlas.disk.partition.iops.max metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionIopsMaxDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection) { mb.metricMongodbatlasDiskPartitionIopsMax.recordDataPoint(mb.startTime, ts, val, diskDirectionAttributeValue.String()) } // RecordMongodbatlasDiskPartitionLatencyAverageDataPoint adds a data point to mongodbatlas.disk.partition.latency.average metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyAverageDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection) { mb.metricMongodbatlasDiskPartitionLatencyAverage.recordDataPoint(mb.startTime, ts, val, diskDirectionAttributeValue.String()) } // RecordMongodbatlasDiskPartitionLatencyMaxDataPoint adds a data point to mongodbatlas.disk.partition.latency.max metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyMaxDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection) { mb.metricMongodbatlasDiskPartitionLatencyMax.recordDataPoint(mb.startTime, ts, val, diskDirectionAttributeValue.String()) } // RecordMongodbatlasDiskPartitionQueueDepthDataPoint adds a data point to mongodbatlas.disk.partition.queue.depth metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionQueueDepthDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasDiskPartitionQueueDepth.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasDiskPartitionSpaceAverageDataPoint adds a data point to mongodbatlas.disk.partition.space.average metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceAverageDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus) { mb.metricMongodbatlasDiskPartitionSpaceAverage.recordDataPoint(mb.startTime, ts, val, diskStatusAttributeValue.String()) } // RecordMongodbatlasDiskPartitionSpaceMaxDataPoint adds a data point to mongodbatlas.disk.partition.space.max metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceMaxDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus) { mb.metricMongodbatlasDiskPartitionSpaceMax.recordDataPoint(mb.startTime, ts, val, diskStatusAttributeValue.String()) } // RecordMongodbatlasDiskPartitionThroughputDataPoint adds a data point to mongodbatlas.disk.partition.throughput metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionThroughputDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection) { mb.metricMongodbatlasDiskPartitionThroughput.recordDataPoint(mb.startTime, ts, val, diskDirectionAttributeValue.String()) } // RecordMongodbatlasDiskPartitionUsageAverageDataPoint adds a data point to mongodbatlas.disk.partition.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUsageAverageDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus) { mb.metricMongodbatlasDiskPartitionUsageAverage.recordDataPoint(mb.startTime, ts, val, diskStatusAttributeValue.String()) } // RecordMongodbatlasDiskPartitionUsageMaxDataPoint adds a data point to mongodbatlas.disk.partition.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUsageMaxDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus) { mb.metricMongodbatlasDiskPartitionUsageMax.recordDataPoint(mb.startTime, ts, val, diskStatusAttributeValue.String()) } // RecordMongodbatlasDiskPartitionUtilizationAverageDataPoint adds a data point to mongodbatlas.disk.partition.utilization.average metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationAverageDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasDiskPartitionUtilizationAverage.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasDiskPartitionUtilizationMaxDataPoint adds a data point to mongodbatlas.disk.partition.utilization.max metric. func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationMaxDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasDiskPartitionUtilizationMax.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessAssertsDataPoint adds a data point to mongodbatlas.process.asserts metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessAssertsDataPoint(ts pcommon.Timestamp, val float64, assertTypeAttributeValue AttributeAssertType) { mb.metricMongodbatlasProcessAsserts.recordDataPoint(mb.startTime, ts, val, assertTypeAttributeValue.String()) } // RecordMongodbatlasProcessBackgroundFlushDataPoint adds a data point to mongodbatlas.process.background_flush metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessBackgroundFlushDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessBackgroundFlush.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessCacheIoDataPoint adds a data point to mongodbatlas.process.cache.io metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheIoDataPoint(ts pcommon.Timestamp, val float64, cacheDirectionAttributeValue AttributeCacheDirection) { mb.metricMongodbatlasProcessCacheIo.recordDataPoint(mb.startTime, ts, val, cacheDirectionAttributeValue.String()) } // RecordMongodbatlasProcessCacheRatioDataPoint adds a data point to mongodbatlas.process.cache.ratio metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheRatioDataPoint(ts pcommon.Timestamp, val float64, cacheRatioTypeAttributeValue AttributeCacheRatioType) { mb.metricMongodbatlasProcessCacheRatio.recordDataPoint(mb.startTime, ts, val, cacheRatioTypeAttributeValue.String()) } // RecordMongodbatlasProcessCacheSizeDataPoint adds a data point to mongodbatlas.process.cache.size metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheSizeDataPoint(ts pcommon.Timestamp, val float64, cacheStatusAttributeValue AttributeCacheStatus) { mb.metricMongodbatlasProcessCacheSize.recordDataPoint(mb.startTime, ts, val, cacheStatusAttributeValue.String()) } // RecordMongodbatlasProcessConnectionsDataPoint adds a data point to mongodbatlas.process.connections metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessConnectionsDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessConnections.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessCPUChildrenNormalizedUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.children.normalized.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUChildrenNormalizedUsageAverage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUChildrenNormalizedUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.children.normalized.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUChildrenNormalizedUsageMax.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUChildrenUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.children.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUChildrenUsageAverage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUChildrenUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.children.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUChildrenUsageMax.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUNormalizedUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.normalized.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUNormalizedUsageAverage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUNormalizedUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.normalized.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUNormalizedUsageMax.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUUsageAverage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCPUUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasProcessCPUUsageMax.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasProcessCursorsDataPoint adds a data point to mongodbatlas.process.cursors metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessCursorsDataPoint(ts pcommon.Timestamp, val float64, cursorStateAttributeValue AttributeCursorState) { mb.metricMongodbatlasProcessCursors.recordDataPoint(mb.startTime, ts, val, cursorStateAttributeValue.String()) } // RecordMongodbatlasProcessDbDocumentRateDataPoint adds a data point to mongodbatlas.process.db.document.rate metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessDbDocumentRateDataPoint(ts pcommon.Timestamp, val float64, documentStatusAttributeValue AttributeDocumentStatus) { mb.metricMongodbatlasProcessDbDocumentRate.recordDataPoint(mb.startTime, ts, val, documentStatusAttributeValue.String()) } // RecordMongodbatlasProcessDbOperationsRateDataPoint adds a data point to mongodbatlas.process.db.operations.rate metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessDbOperationsRateDataPoint(ts pcommon.Timestamp, val float64, operationAttributeValue AttributeOperation, clusterRoleAttributeValue AttributeClusterRole) { mb.metricMongodbatlasProcessDbOperationsRate.recordDataPoint(mb.startTime, ts, val, operationAttributeValue.String(), clusterRoleAttributeValue.String()) } // RecordMongodbatlasProcessDbOperationsTimeDataPoint adds a data point to mongodbatlas.process.db.operations.time metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessDbOperationsTimeDataPoint(ts pcommon.Timestamp, val float64, executionTypeAttributeValue AttributeExecutionType) { mb.metricMongodbatlasProcessDbOperationsTime.recordDataPoint(mb.startTime, ts, val, executionTypeAttributeValue.String()) } // RecordMongodbatlasProcessDbQueryExecutorScannedDataPoint adds a data point to mongodbatlas.process.db.query_executor.scanned metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessDbQueryExecutorScannedDataPoint(ts pcommon.Timestamp, val float64, scannedTypeAttributeValue AttributeScannedType) { mb.metricMongodbatlasProcessDbQueryExecutorScanned.recordDataPoint(mb.startTime, ts, val, scannedTypeAttributeValue.String()) } // RecordMongodbatlasProcessDbQueryTargetingScannedPerReturnedDataPoint adds a data point to mongodbatlas.process.db.query_targeting.scanned_per_returned metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessDbQueryTargetingScannedPerReturnedDataPoint(ts pcommon.Timestamp, val float64, scannedTypeAttributeValue AttributeScannedType) { mb.metricMongodbatlasProcessDbQueryTargetingScannedPerReturned.recordDataPoint(mb.startTime, ts, val, scannedTypeAttributeValue.String()) } // RecordMongodbatlasProcessDbStorageDataPoint adds a data point to mongodbatlas.process.db.storage metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessDbStorageDataPoint(ts pcommon.Timestamp, val float64, storageStatusAttributeValue AttributeStorageStatus) { mb.metricMongodbatlasProcessDbStorage.recordDataPoint(mb.startTime, ts, val, storageStatusAttributeValue.String()) } // RecordMongodbatlasProcessGlobalLockDataPoint adds a data point to mongodbatlas.process.global_lock metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessGlobalLockDataPoint(ts pcommon.Timestamp, val float64, globalLockStateAttributeValue AttributeGlobalLockState) { mb.metricMongodbatlasProcessGlobalLock.recordDataPoint(mb.startTime, ts, val, globalLockStateAttributeValue.String()) } // RecordMongodbatlasProcessIndexBtreeMissRatioDataPoint adds a data point to mongodbatlas.process.index.btree_miss_ratio metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessIndexBtreeMissRatioDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessIndexBtreeMissRatio.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessIndexCountersDataPoint adds a data point to mongodbatlas.process.index.counters metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessIndexCountersDataPoint(ts pcommon.Timestamp, val float64, btreeCounterTypeAttributeValue AttributeBtreeCounterType) { mb.metricMongodbatlasProcessIndexCounters.recordDataPoint(mb.startTime, ts, val, btreeCounterTypeAttributeValue.String()) } // RecordMongodbatlasProcessJournalingCommitsDataPoint adds a data point to mongodbatlas.process.journaling.commits metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingCommitsDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessJournalingCommits.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessJournalingDataFilesDataPoint adds a data point to mongodbatlas.process.journaling.data_files metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingDataFilesDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessJournalingDataFiles.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessJournalingWrittenDataPoint adds a data point to mongodbatlas.process.journaling.written metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingWrittenDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessJournalingWritten.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessMemoryUsageDataPoint adds a data point to mongodbatlas.process.memory.usage metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessMemoryUsageDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState) { mb.metricMongodbatlasProcessMemoryUsage.recordDataPoint(mb.startTime, ts, val, memoryStateAttributeValue.String()) } // RecordMongodbatlasProcessNetworkIoDataPoint adds a data point to mongodbatlas.process.network.io metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessNetworkIoDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection) { mb.metricMongodbatlasProcessNetworkIo.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) } // RecordMongodbatlasProcessNetworkRequestsDataPoint adds a data point to mongodbatlas.process.network.requests metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessNetworkRequestsDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessNetworkRequests.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessOplogRateDataPoint adds a data point to mongodbatlas.process.oplog.rate metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessOplogRateDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessOplogRate.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessOplogTimeDataPoint adds a data point to mongodbatlas.process.oplog.time metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessOplogTimeDataPoint(ts pcommon.Timestamp, val float64, oplogTypeAttributeValue AttributeOplogType) { mb.metricMongodbatlasProcessOplogTime.recordDataPoint(mb.startTime, ts, val, oplogTypeAttributeValue.String()) } // RecordMongodbatlasProcessPageFaultsDataPoint adds a data point to mongodbatlas.process.page_faults metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessPageFaultsDataPoint(ts pcommon.Timestamp, val float64, memoryIssueTypeAttributeValue AttributeMemoryIssueType) { mb.metricMongodbatlasProcessPageFaults.recordDataPoint(mb.startTime, ts, val, memoryIssueTypeAttributeValue.String()) } // RecordMongodbatlasProcessRestartsDataPoint adds a data point to mongodbatlas.process.restarts metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessRestartsDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasProcessRestarts.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasProcessTicketsDataPoint adds a data point to mongodbatlas.process.tickets metric. func (mb *MetricsBuilder) RecordMongodbatlasProcessTicketsDataPoint(ts pcommon.Timestamp, val float64, ticketTypeAttributeValue AttributeTicketType) { mb.metricMongodbatlasProcessTickets.recordDataPoint(mb.startTime, ts, val, ticketTypeAttributeValue.String()) } // RecordMongodbatlasSystemCPUNormalizedUsageAverageDataPoint adds a data point to mongodbatlas.system.cpu.normalized.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasSystemCPUNormalizedUsageAverage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasSystemCPUNormalizedUsageMaxDataPoint adds a data point to mongodbatlas.system.cpu.normalized.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasSystemCPUNormalizedUsageMax.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasSystemCPUUsageAverageDataPoint adds a data point to mongodbatlas.system.cpu.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasSystemCPUUsageAverage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasSystemCPUUsageMaxDataPoint adds a data point to mongodbatlas.system.cpu.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasSystemCPUUsageMax.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasSystemFtsCPUNormalizedUsageDataPoint adds a data point to mongodbatlas.system.fts.cpu.normalized.usage metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsCPUNormalizedUsageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasSystemFtsCPUNormalizedUsage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasSystemFtsCPUUsageDataPoint adds a data point to mongodbatlas.system.fts.cpu.usage metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsCPUUsageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState) { mb.metricMongodbatlasSystemFtsCPUUsage.recordDataPoint(mb.startTime, ts, val, cpuStateAttributeValue.String()) } // RecordMongodbatlasSystemFtsDiskUsedDataPoint adds a data point to mongodbatlas.system.fts.disk.used metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsDiskUsedDataPoint(ts pcommon.Timestamp, val float64) { mb.metricMongodbatlasSystemFtsDiskUsed.recordDataPoint(mb.startTime, ts, val) } // RecordMongodbatlasSystemFtsMemoryUsageDataPoint adds a data point to mongodbatlas.system.fts.memory.usage metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsMemoryUsageDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState) { mb.metricMongodbatlasSystemFtsMemoryUsage.recordDataPoint(mb.startTime, ts, val, memoryStateAttributeValue.String()) } // RecordMongodbatlasSystemMemoryUsageAverageDataPoint adds a data point to mongodbatlas.system.memory.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemMemoryUsageAverageDataPoint(ts pcommon.Timestamp, val float64, memoryStatusAttributeValue AttributeMemoryStatus) { mb.metricMongodbatlasSystemMemoryUsageAverage.recordDataPoint(mb.startTime, ts, val, memoryStatusAttributeValue.String()) } // RecordMongodbatlasSystemMemoryUsageMaxDataPoint adds a data point to mongodbatlas.system.memory.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemMemoryUsageMaxDataPoint(ts pcommon.Timestamp, val float64, memoryStatusAttributeValue AttributeMemoryStatus) { mb.metricMongodbatlasSystemMemoryUsageMax.recordDataPoint(mb.startTime, ts, val, memoryStatusAttributeValue.String()) } // RecordMongodbatlasSystemNetworkIoAverageDataPoint adds a data point to mongodbatlas.system.network.io.average metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemNetworkIoAverageDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection) { mb.metricMongodbatlasSystemNetworkIoAverage.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) } // RecordMongodbatlasSystemNetworkIoMaxDataPoint adds a data point to mongodbatlas.system.network.io.max metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemNetworkIoMaxDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection) { mb.metricMongodbatlasSystemNetworkIoMax.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) } // RecordMongodbatlasSystemPagingIoAverageDataPoint adds a data point to mongodbatlas.system.paging.io.average metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingIoAverageDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection) { mb.metricMongodbatlasSystemPagingIoAverage.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) } // RecordMongodbatlasSystemPagingIoMaxDataPoint adds a data point to mongodbatlas.system.paging.io.max metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingIoMaxDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection) { mb.metricMongodbatlasSystemPagingIoMax.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) } // RecordMongodbatlasSystemPagingUsageAverageDataPoint adds a data point to mongodbatlas.system.paging.usage.average metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingUsageAverageDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState) { mb.metricMongodbatlasSystemPagingUsageAverage.recordDataPoint(mb.startTime, ts, val, memoryStateAttributeValue.String()) } // RecordMongodbatlasSystemPagingUsageMaxDataPoint adds a data point to mongodbatlas.system.paging.usage.max metric. func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingUsageMaxDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState) { mb.metricMongodbatlasSystemPagingUsageMax.recordDataPoint(mb.startTime, ts, val, memoryStateAttributeValue.String()) } // 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. func (mb *MetricsBuilder) Reset(options ...MetricBuilderOption) { mb.startTime = pcommon.NewTimestampFromTime(time.Now()) for _, op := range options { op.apply(mb) } }