Documentation ¶
Index ¶
- Constants
- Variables
- func MeasurementsToMetric(mb *MetricsBuilder, meas *mongodbatlas.Measurements) error
- type AttributeAssertType
- type AttributeBtreeCounterType
- type AttributeCPUState
- type AttributeCacheDirection
- type AttributeCacheRatioType
- type AttributeCacheStatus
- type AttributeClusterRole
- type AttributeCursorState
- type AttributeDirection
- type AttributeDiskDirection
- type AttributeDiskStatus
- type AttributeDocumentStatus
- type AttributeExecutionType
- type AttributeGlobalLockState
- type AttributeMemoryIssueType
- type AttributeMemoryState
- type AttributeMemoryStatus
- type AttributeObjectType
- type AttributeOperation
- type AttributeOplogType
- type AttributeScannedType
- type AttributeStorageStatus
- type AttributeTicketType
- type MetricBuilderOption
- type MetricConfig
- type MetricsBuilder
- func (mb *MetricsBuilder) Emit(options ...ResourceMetricsOption) pmetric.Metrics
- func (mb *MetricsBuilder) EmitForResource(options ...ResourceMetricsOption)
- func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder
- func (mb *MetricsBuilder) RecordMongodbatlasDbCountsDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDbSizeDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionIopsAverageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionIopsMaxDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyAverageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyMaxDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionQueueDepthDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceAverageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceMaxDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionThroughputDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUsageAverageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUsageMaxDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationAverageDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationMaxDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessAssertsDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessBackgroundFlushDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheIoDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheRatioDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheSizeDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessConnectionsDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessCursorsDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessDbDocumentRateDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessDbOperationsRateDataPoint(ts pcommon.Timestamp, val float64, operationAttributeValue AttributeOperation, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessDbOperationsTimeDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessDbQueryExecutorScannedDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessDbQueryTargetingScannedPerReturnedDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessDbStorageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessGlobalLockDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessIndexBtreeMissRatioDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessIndexCountersDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingCommitsDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingDataFilesDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingWrittenDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessMemoryUsageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessNetworkIoDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessNetworkRequestsDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessOplogRateDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessOplogTimeDataPoint(ts pcommon.Timestamp, val float64, oplogTypeAttributeValue AttributeOplogType)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessPageFaultsDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessRestartsDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasProcessTicketsDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsCPUNormalizedUsageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsCPUUsageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsDiskUsedDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsMemoryUsageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemMemoryUsageAverageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemMemoryUsageMaxDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemNetworkIoAverageDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemNetworkIoMaxDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingIoAverageDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingIoMaxDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingUsageAverageDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingUsageMaxDataPoint(ts pcommon.Timestamp, val float64, ...)
- func (mb *MetricsBuilder) Reset(options ...MetricBuilderOption)
- type MetricsBuilderConfig
- type MetricsConfig
- type ResourceAttributeConfig
- type ResourceAttributesConfig
- type ResourceBuilder
- func (rb *ResourceBuilder) Emit() pcommon.Resource
- func (rb *ResourceBuilder) SetMongodbAtlasClusterName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasDbName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasDiskPartition(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasHostName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasOrgName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasProcessID(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasProcessPort(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasProcessTypeName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasProjectID(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasProjectName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasProviderName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasRegionName(val string)
- func (rb *ResourceBuilder) SetMongodbAtlasUserAlias(val string)
- type ResourceMetricsOption
Constants ¶
const ( MetricsStability = component.StabilityLevelBeta LogsStability = component.StabilityLevelBeta )
Variables ¶
var ( Type = component.MustNewType("mongodbatlas") ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver" )
var MapAttributeAssertType = map[string]AttributeAssertType{ "regular": AttributeAssertTypeRegular, "warning": AttributeAssertTypeWarning, "msg": AttributeAssertTypeMsg, "user": AttributeAssertTypeUser, }
MapAttributeAssertType is a helper map of string to AttributeAssertType attribute value.
var MapAttributeBtreeCounterType = map[string]AttributeBtreeCounterType{ "accesses": AttributeBtreeCounterTypeAccesses, "hits": AttributeBtreeCounterTypeHits, "misses": AttributeBtreeCounterTypeMisses, }
MapAttributeBtreeCounterType is a helper map of string to AttributeBtreeCounterType attribute value.
var MapAttributeCPUState = map[string]AttributeCPUState{ "kernel": AttributeCPUStateKernel, "user": AttributeCPUStateUser, "nice": AttributeCPUStateNice, "iowait": AttributeCPUStateIowait, "irq": AttributeCPUStateIrq, "softirq": AttributeCPUStateSoftirq, "guest": AttributeCPUStateGuest, "steal": AttributeCPUStateSteal, }
MapAttributeCPUState is a helper map of string to AttributeCPUState attribute value.
var MapAttributeCacheDirection = map[string]AttributeCacheDirection{ "read_into": AttributeCacheDirectionReadInto, "written_from": AttributeCacheDirectionWrittenFrom, }
MapAttributeCacheDirection is a helper map of string to AttributeCacheDirection attribute value.
var MapAttributeCacheRatioType = map[string]AttributeCacheRatioType{ "cache_fill": AttributeCacheRatioTypeCacheFill, "dirty_fill": AttributeCacheRatioTypeDirtyFill, }
MapAttributeCacheRatioType is a helper map of string to AttributeCacheRatioType attribute value.
var MapAttributeCacheStatus = map[string]AttributeCacheStatus{ "dirty": AttributeCacheStatusDirty, "used": AttributeCacheStatusUsed, }
MapAttributeCacheStatus is a helper map of string to AttributeCacheStatus attribute value.
var MapAttributeClusterRole = map[string]AttributeClusterRole{ "primary": AttributeClusterRolePrimary, "replica": AttributeClusterRoleReplica, }
MapAttributeClusterRole is a helper map of string to AttributeClusterRole attribute value.
var MapAttributeCursorState = map[string]AttributeCursorState{ "timed_out": AttributeCursorStateTimedOut, "open": AttributeCursorStateOpen, }
MapAttributeCursorState is a helper map of string to AttributeCursorState attribute value.
var MapAttributeDirection = map[string]AttributeDirection{ "receive": AttributeDirectionReceive, "transmit": AttributeDirectionTransmit, }
MapAttributeDirection is a helper map of string to AttributeDirection attribute value.
var MapAttributeDiskDirection = map[string]AttributeDiskDirection{ "read": AttributeDiskDirectionRead, "write": AttributeDiskDirectionWrite, "total": AttributeDiskDirectionTotal, }
MapAttributeDiskDirection is a helper map of string to AttributeDiskDirection attribute value.
var MapAttributeDiskStatus = map[string]AttributeDiskStatus{ "free": AttributeDiskStatusFree, "used": AttributeDiskStatusUsed, }
MapAttributeDiskStatus is a helper map of string to AttributeDiskStatus attribute value.
var MapAttributeDocumentStatus = map[string]AttributeDocumentStatus{ "returned": AttributeDocumentStatusReturned, "inserted": AttributeDocumentStatusInserted, "updated": AttributeDocumentStatusUpdated, "deleted": AttributeDocumentStatusDeleted, }
MapAttributeDocumentStatus is a helper map of string to AttributeDocumentStatus attribute value.
var MapAttributeExecutionType = map[string]AttributeExecutionType{ "reads": AttributeExecutionTypeReads, "writes": AttributeExecutionTypeWrites, "commands": AttributeExecutionTypeCommands, }
MapAttributeExecutionType is a helper map of string to AttributeExecutionType attribute value.
var MapAttributeGlobalLockState = map[string]AttributeGlobalLockState{ "current_queue_total": AttributeGlobalLockStateCurrentQueueTotal, "current_queue_readers": AttributeGlobalLockStateCurrentQueueReaders, "current_queue_writers": AttributeGlobalLockStateCurrentQueueWriters, }
MapAttributeGlobalLockState is a helper map of string to AttributeGlobalLockState attribute value.
var MapAttributeMemoryIssueType = map[string]AttributeMemoryIssueType{ "extra_info": AttributeMemoryIssueTypeExtraInfo, "global_accesses_not_in_memory": AttributeMemoryIssueTypeGlobalAccessesNotInMemory, "exceptions_thrown": AttributeMemoryIssueTypeExceptionsThrown, }
MapAttributeMemoryIssueType is a helper map of string to AttributeMemoryIssueType attribute value.
var MapAttributeMemoryState = map[string]AttributeMemoryState{ "resident": AttributeMemoryStateResident, "virtual": AttributeMemoryStateVirtual, "mapped": AttributeMemoryStateMapped, "computed": AttributeMemoryStateComputed, "shared": AttributeMemoryStateShared, "free": AttributeMemoryStateFree, "used": AttributeMemoryStateUsed, }
MapAttributeMemoryState is a helper map of string to AttributeMemoryState attribute value.
var MapAttributeMemoryStatus = map[string]AttributeMemoryStatus{ "available": AttributeMemoryStatusAvailable, "buffers": AttributeMemoryStatusBuffers, "cached": AttributeMemoryStatusCached, "free": AttributeMemoryStatusFree, "shared": AttributeMemoryStatusShared, "used": AttributeMemoryStatusUsed, }
MapAttributeMemoryStatus is a helper map of string to AttributeMemoryStatus attribute value.
var MapAttributeObjectType = map[string]AttributeObjectType{ "collection": AttributeObjectTypeCollection, "index": AttributeObjectTypeIndex, "extent": AttributeObjectTypeExtent, "object": AttributeObjectTypeObject, "view": AttributeObjectTypeView, "storage": AttributeObjectTypeStorage, "data": AttributeObjectTypeData, }
MapAttributeObjectType is a helper map of string to AttributeObjectType 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, }
MapAttributeOperation is a helper map of string to AttributeOperation attribute value.
var MapAttributeOplogType = map[string]AttributeOplogType{ "slave_lag_master_time": AttributeOplogTypeSlaveLagMasterTime, "master_time": AttributeOplogTypeMasterTime, "master_lag_time_diff": AttributeOplogTypeMasterLagTimeDiff, }
MapAttributeOplogType is a helper map of string to AttributeOplogType attribute value.
var MapAttributeScannedType = map[string]AttributeScannedType{ "index_items": AttributeScannedTypeIndexItems, "objects": AttributeScannedTypeObjects, }
MapAttributeScannedType is a helper map of string to AttributeScannedType attribute value.
var MapAttributeStorageStatus = map[string]AttributeStorageStatus{ "total": AttributeStorageStatusTotal, "data_size": AttributeStorageStatusDataSize, "index_size": AttributeStorageStatusIndexSize, "data_size_wo_system": AttributeStorageStatusDataSizeWoSystem, }
MapAttributeStorageStatus is a helper map of string to AttributeStorageStatus attribute value.
var MapAttributeTicketType = map[string]AttributeTicketType{ "available_reads": AttributeTicketTypeAvailableReads, "available_writes": AttributeTicketTypeAvailableWrites, }
MapAttributeTicketType is a helper map of string to AttributeTicketType attribute value.
Functions ¶
func MeasurementsToMetric ¶
func MeasurementsToMetric(mb *MetricsBuilder, meas *mongodbatlas.Measurements) error
Types ¶
type AttributeAssertType ¶
type AttributeAssertType int
AttributeAssertType specifies the a value assert_type attribute.
const ( AttributeAssertTypeRegular AttributeAssertType AttributeAssertTypeWarning AttributeAssertTypeMsg AttributeAssertTypeUser )
func (AttributeAssertType) String ¶ added in v0.51.0
func (av AttributeAssertType) String() string
String returns the string representation of the AttributeAssertType.
type AttributeBtreeCounterType ¶
type AttributeBtreeCounterType int
AttributeBtreeCounterType specifies the a value btree_counter_type attribute.
const ( AttributeBtreeCounterTypeAccesses AttributeBtreeCounterType AttributeBtreeCounterTypeHits AttributeBtreeCounterTypeMisses )
func (AttributeBtreeCounterType) String ¶ added in v0.51.0
func (av AttributeBtreeCounterType) String() string
String returns the string representation of the AttributeBtreeCounterType.
type AttributeCPUState ¶
type AttributeCPUState int
AttributeCPUState specifies the a value cpu_state attribute.
const ( AttributeCPUStateKernel AttributeCPUState AttributeCPUStateUser AttributeCPUStateNice AttributeCPUStateIowait AttributeCPUStateIrq AttributeCPUStateSoftirq AttributeCPUStateGuest AttributeCPUStateSteal )
func (AttributeCPUState) String ¶ added in v0.51.0
func (av AttributeCPUState) String() string
String returns the string representation of the AttributeCPUState.
type AttributeCacheDirection ¶
type AttributeCacheDirection int
AttributeCacheDirection specifies the a value cache_direction attribute.
const ( AttributeCacheDirectionReadInto AttributeCacheDirection AttributeCacheDirectionWrittenFrom )
func (AttributeCacheDirection) String ¶ added in v0.51.0
func (av AttributeCacheDirection) String() string
String returns the string representation of the AttributeCacheDirection.
type AttributeCacheRatioType ¶ added in v0.116.0
type AttributeCacheRatioType int
AttributeCacheRatioType specifies the a value cache_ratio_type attribute.
const ( AttributeCacheRatioTypeCacheFill AttributeCacheRatioType AttributeCacheRatioTypeDirtyFill )
func (AttributeCacheRatioType) String ¶ added in v0.116.0
func (av AttributeCacheRatioType) String() string
String returns the string representation of the AttributeCacheRatioType.
type AttributeCacheStatus ¶
type AttributeCacheStatus int
AttributeCacheStatus specifies the a value cache_status attribute.
const ( AttributeCacheStatusDirty AttributeCacheStatus AttributeCacheStatusUsed )
func (AttributeCacheStatus) String ¶ added in v0.51.0
func (av AttributeCacheStatus) String() string
String returns the string representation of the AttributeCacheStatus.
type AttributeClusterRole ¶
type AttributeClusterRole int
AttributeClusterRole specifies the a value cluster_role attribute.
const ( AttributeClusterRolePrimary AttributeClusterRole AttributeClusterRoleReplica )
func (AttributeClusterRole) String ¶ added in v0.51.0
func (av AttributeClusterRole) String() string
String returns the string representation of the AttributeClusterRole.
type AttributeCursorState ¶
type AttributeCursorState int
AttributeCursorState specifies the a value cursor_state attribute.
const ( AttributeCursorStateTimedOut AttributeCursorState AttributeCursorStateOpen )
func (AttributeCursorState) String ¶ added in v0.51.0
func (av AttributeCursorState) String() string
String returns the string representation of the AttributeCursorState.
type AttributeDirection ¶
type AttributeDirection int
AttributeDirection specifies the a value direction attribute.
const ( AttributeDirectionReceive AttributeDirection AttributeDirectionTransmit )
func (AttributeDirection) String ¶ added in v0.51.0
func (av AttributeDirection) String() string
String returns the string representation of the AttributeDirection.
type AttributeDiskDirection ¶
type AttributeDiskDirection int
AttributeDiskDirection specifies the a value disk_direction attribute.
const ( AttributeDiskDirectionRead AttributeDiskDirection AttributeDiskDirectionWrite AttributeDiskDirectionTotal )
func (AttributeDiskDirection) String ¶ added in v0.51.0
func (av AttributeDiskDirection) String() string
String returns the string representation of the AttributeDiskDirection.
type AttributeDiskStatus ¶
type AttributeDiskStatus int
AttributeDiskStatus specifies the a value disk_status attribute.
const ( AttributeDiskStatusFree AttributeDiskStatus AttributeDiskStatusUsed )
func (AttributeDiskStatus) String ¶ added in v0.51.0
func (av AttributeDiskStatus) String() string
String returns the string representation of the AttributeDiskStatus.
type AttributeDocumentStatus ¶
type AttributeDocumentStatus int
AttributeDocumentStatus specifies the a value document_status attribute.
const ( AttributeDocumentStatusReturned AttributeDocumentStatus AttributeDocumentStatusInserted AttributeDocumentStatusUpdated AttributeDocumentStatusDeleted )
func (AttributeDocumentStatus) String ¶ added in v0.51.0
func (av AttributeDocumentStatus) String() string
String returns the string representation of the AttributeDocumentStatus.
type AttributeExecutionType ¶
type AttributeExecutionType int
AttributeExecutionType specifies the a value execution_type attribute.
const ( AttributeExecutionTypeReads AttributeExecutionType AttributeExecutionTypeWrites AttributeExecutionTypeCommands )
func (AttributeExecutionType) String ¶ added in v0.51.0
func (av AttributeExecutionType) String() string
String returns the string representation of the AttributeExecutionType.
type AttributeGlobalLockState ¶
type AttributeGlobalLockState int
AttributeGlobalLockState specifies the a value global_lock_state attribute.
const ( AttributeGlobalLockStateCurrentQueueTotal AttributeGlobalLockState AttributeGlobalLockStateCurrentQueueReaders AttributeGlobalLockStateCurrentQueueWriters )
func (AttributeGlobalLockState) String ¶ added in v0.51.0
func (av AttributeGlobalLockState) String() string
String returns the string representation of the AttributeGlobalLockState.
type AttributeMemoryIssueType ¶
type AttributeMemoryIssueType int
AttributeMemoryIssueType specifies the a value memory_issue_type attribute.
const ( AttributeMemoryIssueTypeExtraInfo AttributeMemoryIssueType AttributeMemoryIssueTypeGlobalAccessesNotInMemory AttributeMemoryIssueTypeExceptionsThrown )
func (AttributeMemoryIssueType) String ¶ added in v0.51.0
func (av AttributeMemoryIssueType) String() string
String returns the string representation of the AttributeMemoryIssueType.
type AttributeMemoryState ¶
type AttributeMemoryState int
AttributeMemoryState specifies the a value memory_state attribute.
const ( AttributeMemoryStateResident AttributeMemoryState AttributeMemoryStateVirtual AttributeMemoryStateMapped AttributeMemoryStateComputed AttributeMemoryStateFree AttributeMemoryStateUsed )
func (AttributeMemoryState) String ¶ added in v0.51.0
func (av AttributeMemoryState) String() string
String returns the string representation of the AttributeMemoryState.
type AttributeMemoryStatus ¶ added in v0.49.0
type AttributeMemoryStatus int
AttributeMemoryStatus specifies the a value memory_status attribute.
const ( AttributeMemoryStatusAvailable AttributeMemoryStatus AttributeMemoryStatusBuffers AttributeMemoryStatusCached AttributeMemoryStatusFree AttributeMemoryStatusUsed )
func (AttributeMemoryStatus) String ¶ added in v0.51.0
func (av AttributeMemoryStatus) String() string
String returns the string representation of the AttributeMemoryStatus.
type AttributeObjectType ¶
type AttributeObjectType int
AttributeObjectType specifies the a value object_type attribute.
const ( AttributeObjectTypeCollection AttributeObjectType AttributeObjectTypeIndex AttributeObjectTypeExtent AttributeObjectTypeObject AttributeObjectTypeView AttributeObjectTypeStorage AttributeObjectTypeData )
func (AttributeObjectType) String ¶ added in v0.51.0
func (av AttributeObjectType) String() string
String returns the string representation of the AttributeObjectType.
type AttributeOperation ¶
type AttributeOperation int
AttributeOperation specifies the a value operation attribute.
const ( AttributeOperationCmd AttributeOperation AttributeOperationQuery AttributeOperationUpdate AttributeOperationDelete AttributeOperationGetmore AttributeOperationInsert AttributeOperationScanAndOrder AttributeOperationTTLDeleted )
func (AttributeOperation) String ¶ added in v0.51.0
func (av AttributeOperation) String() string
String returns the string representation of the AttributeOperation.
type AttributeOplogType ¶
type AttributeOplogType int
AttributeOplogType specifies the a value oplog_type attribute.
const ( AttributeOplogTypeSlaveLagMasterTime AttributeOplogType AttributeOplogTypeMasterTime AttributeOplogTypeMasterLagTimeDiff )
func (AttributeOplogType) String ¶ added in v0.51.0
func (av AttributeOplogType) String() string
String returns the string representation of the AttributeOplogType.
type AttributeScannedType ¶
type AttributeScannedType int
AttributeScannedType specifies the a value scanned_type attribute.
const ( AttributeScannedTypeIndexItems AttributeScannedType AttributeScannedTypeObjects )
func (AttributeScannedType) String ¶ added in v0.51.0
func (av AttributeScannedType) String() string
String returns the string representation of the AttributeScannedType.
type AttributeStorageStatus ¶
type AttributeStorageStatus int
AttributeStorageStatus specifies the a value storage_status attribute.
const ( AttributeStorageStatusTotal AttributeStorageStatus AttributeStorageStatusDataSize AttributeStorageStatusIndexSize AttributeStorageStatusDataSizeWoSystem )
func (AttributeStorageStatus) String ¶ added in v0.51.0
func (av AttributeStorageStatus) String() string
String returns the string representation of the AttributeStorageStatus.
type AttributeTicketType ¶
type AttributeTicketType int
AttributeTicketType specifies the a value ticket_type attribute.
const ( AttributeTicketTypeAvailableReads AttributeTicketType AttributeTicketTypeAvailableWrites )
func (AttributeTicketType) String ¶ added in v0.51.0
func (av AttributeTicketType) String() string
String returns the string representation of the AttributeTicketType.
type MetricBuilderOption ¶ added in v0.110.0
type MetricBuilderOption interface {
// contains filtered or unexported methods
}
MetricBuilderOption applies changes to default metrics builder.
func WithStartTime ¶ added in v0.49.0
func WithStartTime(startTime pcommon.Timestamp) MetricBuilderOption
WithStartTime sets startTime on the metrics builder.
type MetricConfig ¶ added in v0.77.0
type MetricConfig struct { Enabled bool `mapstructure:"enabled"` // contains filtered or unexported fields }
MetricConfig provides common config for a particular metric.
type MetricsBuilder ¶ added in v0.49.0
type MetricsBuilder struct {
// contains filtered or unexported fields
}
MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations required to produce metric representation defined in metadata and user config.
func NewMetricsBuilder ¶ added in v0.49.0
func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, options ...MetricBuilderOption) *MetricsBuilder
func (*MetricsBuilder) Emit ¶ added in v0.49.0
func (mb *MetricsBuilder) Emit(options ...ResourceMetricsOption) pmetric.Metrics
Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for recording another set of metrics. This function will be responsible for applying all the transformations required to produce metric representation defined in metadata and user config, e.g. delta or cumulative.
func (*MetricsBuilder) EmitForResource ¶ added in v0.49.0
func (mb *MetricsBuilder) EmitForResource(options ...ResourceMetricsOption)
EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for recording another set of data points as part of another resource. This function can be helpful when one scraper needs to emit metrics from several resources. Otherwise calling this function is not required, just `Emit` function can be called instead. Resource attributes should be provided as ResourceMetricsOption arguments.
func (*MetricsBuilder) NewResourceBuilder ¶ added in v0.83.0
func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder
NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics.
func (*MetricsBuilder) RecordMongodbatlasDbCountsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDbCountsDataPoint(ts pcommon.Timestamp, val float64, objectTypeAttributeValue AttributeObjectType)
RecordMongodbatlasDbCountsDataPoint adds a data point to mongodbatlas.db.counts metric.
func (*MetricsBuilder) RecordMongodbatlasDbSizeDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDbSizeDataPoint(ts pcommon.Timestamp, val float64, objectTypeAttributeValue AttributeObjectType)
RecordMongodbatlasDbSizeDataPoint adds a data point to mongodbatlas.db.size metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionIopsAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionIopsAverageDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection)
RecordMongodbatlasDiskPartitionIopsAverageDataPoint adds a data point to mongodbatlas.disk.partition.iops.average metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionIopsMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionIopsMaxDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection)
RecordMongodbatlasDiskPartitionIopsMaxDataPoint adds a data point to mongodbatlas.disk.partition.iops.max metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyAverageDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection)
RecordMongodbatlasDiskPartitionLatencyAverageDataPoint adds a data point to mongodbatlas.disk.partition.latency.average metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionLatencyMaxDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection)
RecordMongodbatlasDiskPartitionLatencyMaxDataPoint adds a data point to mongodbatlas.disk.partition.latency.max metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionQueueDepthDataPoint ¶ added in v0.116.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionQueueDepthDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasDiskPartitionQueueDepthDataPoint adds a data point to mongodbatlas.disk.partition.queue.depth metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceAverageDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus)
RecordMongodbatlasDiskPartitionSpaceAverageDataPoint adds a data point to mongodbatlas.disk.partition.space.average metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionSpaceMaxDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus)
RecordMongodbatlasDiskPartitionSpaceMaxDataPoint adds a data point to mongodbatlas.disk.partition.space.max metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionThroughputDataPoint ¶ added in v0.116.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionThroughputDataPoint(ts pcommon.Timestamp, val float64, diskDirectionAttributeValue AttributeDiskDirection)
RecordMongodbatlasDiskPartitionThroughputDataPoint adds a data point to mongodbatlas.disk.partition.throughput metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUsageAverageDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus)
RecordMongodbatlasDiskPartitionUsageAverageDataPoint adds a data point to mongodbatlas.disk.partition.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUsageMaxDataPoint(ts pcommon.Timestamp, val float64, diskStatusAttributeValue AttributeDiskStatus)
RecordMongodbatlasDiskPartitionUsageMaxDataPoint adds a data point to mongodbatlas.disk.partition.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationAverageDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasDiskPartitionUtilizationAverageDataPoint adds a data point to mongodbatlas.disk.partition.utilization.average metric.
func (*MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasDiskPartitionUtilizationMaxDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasDiskPartitionUtilizationMaxDataPoint adds a data point to mongodbatlas.disk.partition.utilization.max metric.
func (*MetricsBuilder) RecordMongodbatlasProcessAssertsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessAssertsDataPoint(ts pcommon.Timestamp, val float64, assertTypeAttributeValue AttributeAssertType)
RecordMongodbatlasProcessAssertsDataPoint adds a data point to mongodbatlas.process.asserts metric.
func (*MetricsBuilder) RecordMongodbatlasProcessBackgroundFlushDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessBackgroundFlushDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessBackgroundFlushDataPoint adds a data point to mongodbatlas.process.background_flush metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUChildrenNormalizedUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.children.normalized.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUChildrenNormalizedUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.children.normalized.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUChildrenUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.children.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUChildrenUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUChildrenUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.children.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUNormalizedUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.normalized.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUNormalizedUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.normalized.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUUsageAverageDataPoint adds a data point to mongodbatlas.process.cpu.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCPUUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCPUUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasProcessCPUUsageMaxDataPoint adds a data point to mongodbatlas.process.cpu.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCacheIoDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheIoDataPoint(ts pcommon.Timestamp, val float64, cacheDirectionAttributeValue AttributeCacheDirection)
RecordMongodbatlasProcessCacheIoDataPoint adds a data point to mongodbatlas.process.cache.io metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCacheRatioDataPoint ¶ added in v0.116.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheRatioDataPoint(ts pcommon.Timestamp, val float64, cacheRatioTypeAttributeValue AttributeCacheRatioType)
RecordMongodbatlasProcessCacheRatioDataPoint adds a data point to mongodbatlas.process.cache.ratio metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCacheSizeDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCacheSizeDataPoint(ts pcommon.Timestamp, val float64, cacheStatusAttributeValue AttributeCacheStatus)
RecordMongodbatlasProcessCacheSizeDataPoint adds a data point to mongodbatlas.process.cache.size metric.
func (*MetricsBuilder) RecordMongodbatlasProcessConnectionsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessConnectionsDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessConnectionsDataPoint adds a data point to mongodbatlas.process.connections metric.
func (*MetricsBuilder) RecordMongodbatlasProcessCursorsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessCursorsDataPoint(ts pcommon.Timestamp, val float64, cursorStateAttributeValue AttributeCursorState)
RecordMongodbatlasProcessCursorsDataPoint adds a data point to mongodbatlas.process.cursors metric.
func (*MetricsBuilder) RecordMongodbatlasProcessDbDocumentRateDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessDbDocumentRateDataPoint(ts pcommon.Timestamp, val float64, documentStatusAttributeValue AttributeDocumentStatus)
RecordMongodbatlasProcessDbDocumentRateDataPoint adds a data point to mongodbatlas.process.db.document.rate metric.
func (*MetricsBuilder) RecordMongodbatlasProcessDbOperationsRateDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessDbOperationsRateDataPoint(ts pcommon.Timestamp, val float64, operationAttributeValue AttributeOperation, clusterRoleAttributeValue AttributeClusterRole)
RecordMongodbatlasProcessDbOperationsRateDataPoint adds a data point to mongodbatlas.process.db.operations.rate metric.
func (*MetricsBuilder) RecordMongodbatlasProcessDbOperationsTimeDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessDbOperationsTimeDataPoint(ts pcommon.Timestamp, val float64, executionTypeAttributeValue AttributeExecutionType)
RecordMongodbatlasProcessDbOperationsTimeDataPoint adds a data point to mongodbatlas.process.db.operations.time metric.
func (*MetricsBuilder) RecordMongodbatlasProcessDbQueryExecutorScannedDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessDbQueryExecutorScannedDataPoint(ts pcommon.Timestamp, val float64, scannedTypeAttributeValue AttributeScannedType)
RecordMongodbatlasProcessDbQueryExecutorScannedDataPoint adds a data point to mongodbatlas.process.db.query_executor.scanned metric.
func (*MetricsBuilder) RecordMongodbatlasProcessDbQueryTargetingScannedPerReturnedDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessDbQueryTargetingScannedPerReturnedDataPoint(ts pcommon.Timestamp, val float64, scannedTypeAttributeValue AttributeScannedType)
RecordMongodbatlasProcessDbQueryTargetingScannedPerReturnedDataPoint adds a data point to mongodbatlas.process.db.query_targeting.scanned_per_returned metric.
func (*MetricsBuilder) RecordMongodbatlasProcessDbStorageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessDbStorageDataPoint(ts pcommon.Timestamp, val float64, storageStatusAttributeValue AttributeStorageStatus)
RecordMongodbatlasProcessDbStorageDataPoint adds a data point to mongodbatlas.process.db.storage metric.
func (*MetricsBuilder) RecordMongodbatlasProcessGlobalLockDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessGlobalLockDataPoint(ts pcommon.Timestamp, val float64, globalLockStateAttributeValue AttributeGlobalLockState)
RecordMongodbatlasProcessGlobalLockDataPoint adds a data point to mongodbatlas.process.global_lock metric.
func (*MetricsBuilder) RecordMongodbatlasProcessIndexBtreeMissRatioDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessIndexBtreeMissRatioDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessIndexBtreeMissRatioDataPoint adds a data point to mongodbatlas.process.index.btree_miss_ratio metric.
func (*MetricsBuilder) RecordMongodbatlasProcessIndexCountersDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessIndexCountersDataPoint(ts pcommon.Timestamp, val float64, btreeCounterTypeAttributeValue AttributeBtreeCounterType)
RecordMongodbatlasProcessIndexCountersDataPoint adds a data point to mongodbatlas.process.index.counters metric.
func (*MetricsBuilder) RecordMongodbatlasProcessJournalingCommitsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingCommitsDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessJournalingCommitsDataPoint adds a data point to mongodbatlas.process.journaling.commits metric.
func (*MetricsBuilder) RecordMongodbatlasProcessJournalingDataFilesDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingDataFilesDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessJournalingDataFilesDataPoint adds a data point to mongodbatlas.process.journaling.data_files metric.
func (*MetricsBuilder) RecordMongodbatlasProcessJournalingWrittenDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessJournalingWrittenDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessJournalingWrittenDataPoint adds a data point to mongodbatlas.process.journaling.written metric.
func (*MetricsBuilder) RecordMongodbatlasProcessMemoryUsageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessMemoryUsageDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState)
RecordMongodbatlasProcessMemoryUsageDataPoint adds a data point to mongodbatlas.process.memory.usage metric.
func (*MetricsBuilder) RecordMongodbatlasProcessNetworkIoDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessNetworkIoDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
RecordMongodbatlasProcessNetworkIoDataPoint adds a data point to mongodbatlas.process.network.io metric.
func (*MetricsBuilder) RecordMongodbatlasProcessNetworkRequestsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessNetworkRequestsDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessNetworkRequestsDataPoint adds a data point to mongodbatlas.process.network.requests metric.
func (*MetricsBuilder) RecordMongodbatlasProcessOplogRateDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessOplogRateDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessOplogRateDataPoint adds a data point to mongodbatlas.process.oplog.rate metric.
func (*MetricsBuilder) RecordMongodbatlasProcessOplogTimeDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessOplogTimeDataPoint(ts pcommon.Timestamp, val float64, oplogTypeAttributeValue AttributeOplogType)
RecordMongodbatlasProcessOplogTimeDataPoint adds a data point to mongodbatlas.process.oplog.time metric.
func (*MetricsBuilder) RecordMongodbatlasProcessPageFaultsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessPageFaultsDataPoint(ts pcommon.Timestamp, val float64, memoryIssueTypeAttributeValue AttributeMemoryIssueType)
RecordMongodbatlasProcessPageFaultsDataPoint adds a data point to mongodbatlas.process.page_faults metric.
func (*MetricsBuilder) RecordMongodbatlasProcessRestartsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessRestartsDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasProcessRestartsDataPoint adds a data point to mongodbatlas.process.restarts metric.
func (*MetricsBuilder) RecordMongodbatlasProcessTicketsDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasProcessTicketsDataPoint(ts pcommon.Timestamp, val float64, ticketTypeAttributeValue AttributeTicketType)
RecordMongodbatlasProcessTicketsDataPoint adds a data point to mongodbatlas.process.tickets metric.
func (*MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasSystemCPUNormalizedUsageAverageDataPoint adds a data point to mongodbatlas.system.cpu.normalized.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUNormalizedUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasSystemCPUNormalizedUsageMaxDataPoint adds a data point to mongodbatlas.system.cpu.normalized.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasSystemCPUUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUUsageAverageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasSystemCPUUsageAverageDataPoint adds a data point to mongodbatlas.system.cpu.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasSystemCPUUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemCPUUsageMaxDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasSystemCPUUsageMaxDataPoint adds a data point to mongodbatlas.system.cpu.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasSystemFtsCPUNormalizedUsageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsCPUNormalizedUsageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasSystemFtsCPUNormalizedUsageDataPoint adds a data point to mongodbatlas.system.fts.cpu.normalized.usage metric.
func (*MetricsBuilder) RecordMongodbatlasSystemFtsCPUUsageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsCPUUsageDataPoint(ts pcommon.Timestamp, val float64, cpuStateAttributeValue AttributeCPUState)
RecordMongodbatlasSystemFtsCPUUsageDataPoint adds a data point to mongodbatlas.system.fts.cpu.usage metric.
func (*MetricsBuilder) RecordMongodbatlasSystemFtsDiskUsedDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsDiskUsedDataPoint(ts pcommon.Timestamp, val float64)
RecordMongodbatlasSystemFtsDiskUsedDataPoint adds a data point to mongodbatlas.system.fts.disk.used metric.
func (*MetricsBuilder) RecordMongodbatlasSystemFtsMemoryUsageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemFtsMemoryUsageDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState)
RecordMongodbatlasSystemFtsMemoryUsageDataPoint adds a data point to mongodbatlas.system.fts.memory.usage metric.
func (*MetricsBuilder) RecordMongodbatlasSystemMemoryUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemMemoryUsageAverageDataPoint(ts pcommon.Timestamp, val float64, memoryStatusAttributeValue AttributeMemoryStatus)
RecordMongodbatlasSystemMemoryUsageAverageDataPoint adds a data point to mongodbatlas.system.memory.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasSystemMemoryUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemMemoryUsageMaxDataPoint(ts pcommon.Timestamp, val float64, memoryStatusAttributeValue AttributeMemoryStatus)
RecordMongodbatlasSystemMemoryUsageMaxDataPoint adds a data point to mongodbatlas.system.memory.usage.max metric.
func (*MetricsBuilder) RecordMongodbatlasSystemNetworkIoAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemNetworkIoAverageDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
RecordMongodbatlasSystemNetworkIoAverageDataPoint adds a data point to mongodbatlas.system.network.io.average metric.
func (*MetricsBuilder) RecordMongodbatlasSystemNetworkIoMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemNetworkIoMaxDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
RecordMongodbatlasSystemNetworkIoMaxDataPoint adds a data point to mongodbatlas.system.network.io.max metric.
func (*MetricsBuilder) RecordMongodbatlasSystemPagingIoAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingIoAverageDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
RecordMongodbatlasSystemPagingIoAverageDataPoint adds a data point to mongodbatlas.system.paging.io.average metric.
func (*MetricsBuilder) RecordMongodbatlasSystemPagingIoMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingIoMaxDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)
RecordMongodbatlasSystemPagingIoMaxDataPoint adds a data point to mongodbatlas.system.paging.io.max metric.
func (*MetricsBuilder) RecordMongodbatlasSystemPagingUsageAverageDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingUsageAverageDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState)
RecordMongodbatlasSystemPagingUsageAverageDataPoint adds a data point to mongodbatlas.system.paging.usage.average metric.
func (*MetricsBuilder) RecordMongodbatlasSystemPagingUsageMaxDataPoint ¶ added in v0.49.0
func (mb *MetricsBuilder) RecordMongodbatlasSystemPagingUsageMaxDataPoint(ts pcommon.Timestamp, val float64, memoryStateAttributeValue AttributeMemoryState)
RecordMongodbatlasSystemPagingUsageMaxDataPoint adds a data point to mongodbatlas.system.paging.usage.max metric.
func (*MetricsBuilder) Reset ¶ added in v0.49.0
func (mb *MetricsBuilder) Reset(options ...MetricBuilderOption)
Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, and metrics builder should update its startTime and reset it's internal state accordingly.
type MetricsBuilderConfig ¶ added in v0.73.0
type MetricsBuilderConfig struct { Metrics MetricsConfig `mapstructure:"metrics"` ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"` }
MetricsBuilderConfig is a configuration for mongodbatlas metrics builder.
func DefaultMetricsBuilderConfig ¶ added in v0.73.0
func DefaultMetricsBuilderConfig() MetricsBuilderConfig
type MetricsConfig ¶ added in v0.77.0
type MetricsConfig struct { MongodbatlasDbCounts MetricConfig `mapstructure:"mongodbatlas.db.counts"` MongodbatlasDbSize MetricConfig `mapstructure:"mongodbatlas.db.size"` MongodbatlasDiskPartitionIopsAverage MetricConfig `mapstructure:"mongodbatlas.disk.partition.iops.average"` MongodbatlasDiskPartitionIopsMax MetricConfig `mapstructure:"mongodbatlas.disk.partition.iops.max"` MongodbatlasDiskPartitionLatencyAverage MetricConfig `mapstructure:"mongodbatlas.disk.partition.latency.average"` MongodbatlasDiskPartitionLatencyMax MetricConfig `mapstructure:"mongodbatlas.disk.partition.latency.max"` MongodbatlasDiskPartitionQueueDepth MetricConfig `mapstructure:"mongodbatlas.disk.partition.queue.depth"` MongodbatlasDiskPartitionSpaceAverage MetricConfig `mapstructure:"mongodbatlas.disk.partition.space.average"` MongodbatlasDiskPartitionSpaceMax MetricConfig `mapstructure:"mongodbatlas.disk.partition.space.max"` MongodbatlasDiskPartitionThroughput MetricConfig `mapstructure:"mongodbatlas.disk.partition.throughput"` MongodbatlasDiskPartitionUsageAverage MetricConfig `mapstructure:"mongodbatlas.disk.partition.usage.average"` MongodbatlasDiskPartitionUsageMax MetricConfig `mapstructure:"mongodbatlas.disk.partition.usage.max"` MongodbatlasDiskPartitionUtilizationAverage MetricConfig `mapstructure:"mongodbatlas.disk.partition.utilization.average"` MongodbatlasDiskPartitionUtilizationMax MetricConfig `mapstructure:"mongodbatlas.disk.partition.utilization.max"` MongodbatlasProcessAsserts MetricConfig `mapstructure:"mongodbatlas.process.asserts"` MongodbatlasProcessBackgroundFlush MetricConfig `mapstructure:"mongodbatlas.process.background_flush"` MongodbatlasProcessCacheIo MetricConfig `mapstructure:"mongodbatlas.process.cache.io"` MongodbatlasProcessCacheRatio MetricConfig `mapstructure:"mongodbatlas.process.cache.ratio"` MongodbatlasProcessCacheSize MetricConfig `mapstructure:"mongodbatlas.process.cache.size"` MongodbatlasProcessConnections MetricConfig `mapstructure:"mongodbatlas.process.connections"` MongodbatlasProcessCPUChildrenNormalizedUsageAverage MetricConfig `mapstructure:"mongodbatlas.process.cpu.children.normalized.usage.average"` MongodbatlasProcessCPUChildrenNormalizedUsageMax MetricConfig `mapstructure:"mongodbatlas.process.cpu.children.normalized.usage.max"` MongodbatlasProcessCPUChildrenUsageAverage MetricConfig `mapstructure:"mongodbatlas.process.cpu.children.usage.average"` MongodbatlasProcessCPUChildrenUsageMax MetricConfig `mapstructure:"mongodbatlas.process.cpu.children.usage.max"` MongodbatlasProcessCPUNormalizedUsageAverage MetricConfig `mapstructure:"mongodbatlas.process.cpu.normalized.usage.average"` MongodbatlasProcessCPUNormalizedUsageMax MetricConfig `mapstructure:"mongodbatlas.process.cpu.normalized.usage.max"` MongodbatlasProcessCPUUsageAverage MetricConfig `mapstructure:"mongodbatlas.process.cpu.usage.average"` MongodbatlasProcessCPUUsageMax MetricConfig `mapstructure:"mongodbatlas.process.cpu.usage.max"` MongodbatlasProcessCursors MetricConfig `mapstructure:"mongodbatlas.process.cursors"` MongodbatlasProcessDbDocumentRate MetricConfig `mapstructure:"mongodbatlas.process.db.document.rate"` MongodbatlasProcessDbOperationsRate MetricConfig `mapstructure:"mongodbatlas.process.db.operations.rate"` MongodbatlasProcessDbOperationsTime MetricConfig `mapstructure:"mongodbatlas.process.db.operations.time"` MongodbatlasProcessDbQueryExecutorScanned MetricConfig `mapstructure:"mongodbatlas.process.db.query_executor.scanned"` MongodbatlasProcessDbQueryTargetingScannedPerReturned MetricConfig `mapstructure:"mongodbatlas.process.db.query_targeting.scanned_per_returned"` MongodbatlasProcessDbStorage MetricConfig `mapstructure:"mongodbatlas.process.db.storage"` MongodbatlasProcessGlobalLock MetricConfig `mapstructure:"mongodbatlas.process.global_lock"` MongodbatlasProcessIndexBtreeMissRatio MetricConfig `mapstructure:"mongodbatlas.process.index.btree_miss_ratio"` MongodbatlasProcessIndexCounters MetricConfig `mapstructure:"mongodbatlas.process.index.counters"` MongodbatlasProcessJournalingCommits MetricConfig `mapstructure:"mongodbatlas.process.journaling.commits"` MongodbatlasProcessJournalingDataFiles MetricConfig `mapstructure:"mongodbatlas.process.journaling.data_files"` MongodbatlasProcessJournalingWritten MetricConfig `mapstructure:"mongodbatlas.process.journaling.written"` MongodbatlasProcessMemoryUsage MetricConfig `mapstructure:"mongodbatlas.process.memory.usage"` MongodbatlasProcessNetworkIo MetricConfig `mapstructure:"mongodbatlas.process.network.io"` MongodbatlasProcessNetworkRequests MetricConfig `mapstructure:"mongodbatlas.process.network.requests"` MongodbatlasProcessOplogRate MetricConfig `mapstructure:"mongodbatlas.process.oplog.rate"` MongodbatlasProcessOplogTime MetricConfig `mapstructure:"mongodbatlas.process.oplog.time"` MongodbatlasProcessPageFaults MetricConfig `mapstructure:"mongodbatlas.process.page_faults"` MongodbatlasProcessRestarts MetricConfig `mapstructure:"mongodbatlas.process.restarts"` MongodbatlasProcessTickets MetricConfig `mapstructure:"mongodbatlas.process.tickets"` MongodbatlasSystemCPUNormalizedUsageAverage MetricConfig `mapstructure:"mongodbatlas.system.cpu.normalized.usage.average"` MongodbatlasSystemCPUNormalizedUsageMax MetricConfig `mapstructure:"mongodbatlas.system.cpu.normalized.usage.max"` MongodbatlasSystemCPUUsageAverage MetricConfig `mapstructure:"mongodbatlas.system.cpu.usage.average"` MongodbatlasSystemCPUUsageMax MetricConfig `mapstructure:"mongodbatlas.system.cpu.usage.max"` MongodbatlasSystemFtsCPUNormalizedUsage MetricConfig `mapstructure:"mongodbatlas.system.fts.cpu.normalized.usage"` MongodbatlasSystemFtsCPUUsage MetricConfig `mapstructure:"mongodbatlas.system.fts.cpu.usage"` MongodbatlasSystemFtsDiskUsed MetricConfig `mapstructure:"mongodbatlas.system.fts.disk.used"` MongodbatlasSystemFtsMemoryUsage MetricConfig `mapstructure:"mongodbatlas.system.fts.memory.usage"` MongodbatlasSystemMemoryUsageAverage MetricConfig `mapstructure:"mongodbatlas.system.memory.usage.average"` MongodbatlasSystemMemoryUsageMax MetricConfig `mapstructure:"mongodbatlas.system.memory.usage.max"` MongodbatlasSystemNetworkIoAverage MetricConfig `mapstructure:"mongodbatlas.system.network.io.average"` MongodbatlasSystemNetworkIoMax MetricConfig `mapstructure:"mongodbatlas.system.network.io.max"` MongodbatlasSystemPagingIoAverage MetricConfig `mapstructure:"mongodbatlas.system.paging.io.average"` MongodbatlasSystemPagingIoMax MetricConfig `mapstructure:"mongodbatlas.system.paging.io.max"` MongodbatlasSystemPagingUsageAverage MetricConfig `mapstructure:"mongodbatlas.system.paging.usage.average"` MongodbatlasSystemPagingUsageMax MetricConfig `mapstructure:"mongodbatlas.system.paging.usage.max"` }
MetricsConfig provides config for mongodbatlas metrics.
func DefaultMetricsConfig ¶ added in v0.77.0
func DefaultMetricsConfig() MetricsConfig
type ResourceAttributeConfig ¶ added in v0.77.0
type ResourceAttributeConfig struct { Enabled bool `mapstructure:"enabled"` // Experimental: MetricsInclude defines a list of filters for attribute values. // If the list is not empty, only metrics with matching resource attribute values will be emitted. MetricsInclude []filter.Config `mapstructure:"metrics_include"` // Experimental: MetricsExclude defines a list of filters for attribute values. // If the list is not empty, metrics with matching resource attribute values will not be emitted. // MetricsInclude has higher priority than MetricsExclude. MetricsExclude []filter.Config `mapstructure:"metrics_exclude"` // contains filtered or unexported fields }
ResourceAttributeConfig provides common config for a particular resource attribute.
type ResourceAttributesConfig ¶ added in v0.77.0
type ResourceAttributesConfig struct { MongodbAtlasClusterName ResourceAttributeConfig `mapstructure:"mongodb_atlas.cluster.name"` MongodbAtlasDbName ResourceAttributeConfig `mapstructure:"mongodb_atlas.db.name"` MongodbAtlasDiskPartition ResourceAttributeConfig `mapstructure:"mongodb_atlas.disk.partition"` MongodbAtlasHostName ResourceAttributeConfig `mapstructure:"mongodb_atlas.host.name"` MongodbAtlasOrgName ResourceAttributeConfig `mapstructure:"mongodb_atlas.org_name"` MongodbAtlasProcessID ResourceAttributeConfig `mapstructure:"mongodb_atlas.process.id"` MongodbAtlasProcessPort ResourceAttributeConfig `mapstructure:"mongodb_atlas.process.port"` MongodbAtlasProcessTypeName ResourceAttributeConfig `mapstructure:"mongodb_atlas.process.type_name"` MongodbAtlasProjectID ResourceAttributeConfig `mapstructure:"mongodb_atlas.project.id"` MongodbAtlasProjectName ResourceAttributeConfig `mapstructure:"mongodb_atlas.project.name"` MongodbAtlasProviderName ResourceAttributeConfig `mapstructure:"mongodb_atlas.provider.name"` MongodbAtlasRegionName ResourceAttributeConfig `mapstructure:"mongodb_atlas.region.name"` MongodbAtlasUserAlias ResourceAttributeConfig `mapstructure:"mongodb_atlas.user.alias"` }
ResourceAttributesConfig provides config for mongodbatlas resource attributes.
func DefaultResourceAttributesConfig ¶ added in v0.77.0
func DefaultResourceAttributesConfig() ResourceAttributesConfig
type ResourceBuilder ¶ added in v0.82.0
type ResourceBuilder struct {
// contains filtered or unexported fields
}
ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines.
func NewResourceBuilder ¶ added in v0.82.0
func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder
NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application.
func (*ResourceBuilder) Emit ¶ added in v0.82.0
func (rb *ResourceBuilder) Emit() pcommon.Resource
Emit returns the built resource and resets the internal builder state.
func (*ResourceBuilder) SetMongodbAtlasClusterName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasClusterName(val string)
SetMongodbAtlasClusterName sets provided value as "mongodb_atlas.cluster.name" attribute.
func (*ResourceBuilder) SetMongodbAtlasDbName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasDbName(val string)
SetMongodbAtlasDbName sets provided value as "mongodb_atlas.db.name" attribute.
func (*ResourceBuilder) SetMongodbAtlasDiskPartition ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasDiskPartition(val string)
SetMongodbAtlasDiskPartition sets provided value as "mongodb_atlas.disk.partition" attribute.
func (*ResourceBuilder) SetMongodbAtlasHostName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasHostName(val string)
SetMongodbAtlasHostName sets provided value as "mongodb_atlas.host.name" attribute.
func (*ResourceBuilder) SetMongodbAtlasOrgName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasOrgName(val string)
SetMongodbAtlasOrgName sets provided value as "mongodb_atlas.org_name" attribute.
func (*ResourceBuilder) SetMongodbAtlasProcessID ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasProcessID(val string)
SetMongodbAtlasProcessID sets provided value as "mongodb_atlas.process.id" attribute.
func (*ResourceBuilder) SetMongodbAtlasProcessPort ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasProcessPort(val string)
SetMongodbAtlasProcessPort sets provided value as "mongodb_atlas.process.port" attribute.
func (*ResourceBuilder) SetMongodbAtlasProcessTypeName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasProcessTypeName(val string)
SetMongodbAtlasProcessTypeName sets provided value as "mongodb_atlas.process.type_name" attribute.
func (*ResourceBuilder) SetMongodbAtlasProjectID ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasProjectID(val string)
SetMongodbAtlasProjectID sets provided value as "mongodb_atlas.project.id" attribute.
func (*ResourceBuilder) SetMongodbAtlasProjectName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasProjectName(val string)
SetMongodbAtlasProjectName sets provided value as "mongodb_atlas.project.name" attribute.
func (*ResourceBuilder) SetMongodbAtlasProviderName ¶ added in v0.89.0
func (rb *ResourceBuilder) SetMongodbAtlasProviderName(val string)
SetMongodbAtlasProviderName sets provided value as "mongodb_atlas.provider.name" attribute.
func (*ResourceBuilder) SetMongodbAtlasRegionName ¶ added in v0.89.0
func (rb *ResourceBuilder) SetMongodbAtlasRegionName(val string)
SetMongodbAtlasRegionName sets provided value as "mongodb_atlas.region.name" attribute.
func (*ResourceBuilder) SetMongodbAtlasUserAlias ¶ added in v0.82.0
func (rb *ResourceBuilder) SetMongodbAtlasUserAlias(val string)
SetMongodbAtlasUserAlias sets provided value as "mongodb_atlas.user.alias" attribute.
type ResourceMetricsOption ¶ added in v0.52.0
type ResourceMetricsOption interface {
// contains filtered or unexported methods
}
ResourceMetricsOption applies changes to provided resource metrics.
func WithResource ¶ added in v0.82.0
func WithResource(res pcommon.Resource) ResourceMetricsOption
WithResource sets the provided resource on the emitted ResourceMetrics. It's recommended to use ResourceBuilder to create the resource.
func WithStartTimeOverride ¶ added in v0.52.0
func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption
WithStartTimeOverride overrides start time for all the resource metrics data points. This option should be only used if different start time has to be set on metrics coming from different resources.