Documentation ¶
Index ¶
- Variables
- func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption
- type AttributeActivePendingRequestState
- type AttributeCPUType
- type AttributeColumnMemorySubtype
- type AttributeColumnMemoryType
- type AttributeConnectionStatus
- type AttributeDiskStateUsedFree
- type AttributeHostSwapState
- type AttributeInternalExternalRequestType
- type AttributeMemoryStateUsedFree
- type AttributeRowMemoryType
- type AttributeSchemaMemoryType
- type AttributeSchemaOperationType
- type AttributeSchemaRecordType
- type AttributeServiceMemoryUsedType
- type AttributeServiceStatus
- type AttributeThreadStatus
- type AttributeTransactionType
- type AttributeVolumeOperationType
- type MetricSettings
- type MetricsBuilder
- func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics
- func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption)
- func (mb *MetricsBuilder) RecordSaphanaAlertCountDataPoint(ts pcommon.Timestamp, inputVal string, alertRatingAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaBackupLatestDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordSaphanaCPUUsedDataPoint(ts pcommon.Timestamp, inputVal string, cpuTypeAttributeValue AttributeCPUType) error
- func (mb *MetricsBuilder) RecordSaphanaColumnMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaComponentMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, componentAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaConnectionCountDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaDiskSizeCurrentDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaHostMemoryCurrentDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaHostSwapCurrentDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaInstanceCodeSizeDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordSaphanaInstanceMemoryCurrentDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaInstanceMemorySharedAllocatedDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordSaphanaInstanceMemoryUsedPeakDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordSaphanaLicenseExpirationTimeDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaLicenseLimitDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaLicensePeakDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaNetworkRequestAverageTimeDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordSaphanaNetworkRequestCountDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaNetworkRequestFinishedCountDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaReplicationAverageTimeDataPoint(ts pcommon.Timestamp, inputVal string, primaryHostAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaReplicationBacklogSizeDataPoint(ts pcommon.Timestamp, inputVal string, primaryHostAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaReplicationBacklogTimeDataPoint(ts pcommon.Timestamp, inputVal string, primaryHostAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaRowStoreMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaSchemaMemoryUsedCurrentDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaSchemaMemoryUsedMaxDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaSchemaOperationCountDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaSchemaRecordCompressedCountDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaSchemaRecordCountDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaServiceCodeSizeDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaServiceCountDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemoryCompactorsAllocatedDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemoryCompactorsFreeableDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemoryEffectiveLimitDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemoryHeapCurrentDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemoryLimitDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemorySharedCurrentDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaServiceMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaServiceStackSizeDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
- func (mb *MetricsBuilder) RecordSaphanaServiceThreadCountDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaTransactionBlockedDataPoint(ts pcommon.Timestamp, inputVal string) error
- func (mb *MetricsBuilder) RecordSaphanaTransactionCountDataPoint(ts pcommon.Timestamp, inputVal string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaUptimeDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaVolumeOperationCountDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaVolumeOperationSizeDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, ...) error
- func (mb *MetricsBuilder) RecordSaphanaVolumeOperationTimeDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, ...) error
- func (mb *MetricsBuilder) Reset(options ...metricBuilderOption)
- type MetricsBuilderConfig
- type MetricsSettings
- type ResourceAttributeSettings
- type ResourceAttributesSettings
- type ResourceMetricsOption
Constants ¶
This section is empty.
Variables ¶
var MapAttributeActivePendingRequestState = map[string]AttributeActivePendingRequestState{ "active": AttributeActivePendingRequestStateActive, "pending": AttributeActivePendingRequestStatePending, }
MapAttributeActivePendingRequestState is a helper map of string to AttributeActivePendingRequestState attribute value.
var MapAttributeCPUType = map[string]AttributeCPUType{ "user": AttributeCPUTypeUser, "system": AttributeCPUTypeSystem, "io_wait": AttributeCPUTypeIoWait, "idle": AttributeCPUTypeIdle, }
MapAttributeCPUType is a helper map of string to AttributeCPUType attribute value.
var MapAttributeColumnMemorySubtype = map[string]AttributeColumnMemorySubtype{ "data": AttributeColumnMemorySubtypeData, "dict": AttributeColumnMemorySubtypeDict, "index": AttributeColumnMemorySubtypeIndex, "misc": AttributeColumnMemorySubtypeMisc, }
MapAttributeColumnMemorySubtype is a helper map of string to AttributeColumnMemorySubtype attribute value.
var MapAttributeColumnMemoryType = map[string]AttributeColumnMemoryType{ "main": AttributeColumnMemoryTypeMain, "delta": AttributeColumnMemoryTypeDelta, }
MapAttributeColumnMemoryType is a helper map of string to AttributeColumnMemoryType attribute value.
var MapAttributeConnectionStatus = map[string]AttributeConnectionStatus{ "running": AttributeConnectionStatusRunning, "idle": AttributeConnectionStatusIdle, "queueing": AttributeConnectionStatusQueueing, }
MapAttributeConnectionStatus is a helper map of string to AttributeConnectionStatus attribute value.
var MapAttributeDiskStateUsedFree = map[string]AttributeDiskStateUsedFree{ "used": AttributeDiskStateUsedFreeUsed, "free": AttributeDiskStateUsedFreeFree, }
MapAttributeDiskStateUsedFree is a helper map of string to AttributeDiskStateUsedFree attribute value.
var MapAttributeHostSwapState = map[string]AttributeHostSwapState{ "used": AttributeHostSwapStateUsed, "free": AttributeHostSwapStateFree, }
MapAttributeHostSwapState is a helper map of string to AttributeHostSwapState attribute value.
var MapAttributeInternalExternalRequestType = map[string]AttributeInternalExternalRequestType{ "internal": AttributeInternalExternalRequestTypeInternal, "external": AttributeInternalExternalRequestTypeExternal, }
MapAttributeInternalExternalRequestType is a helper map of string to AttributeInternalExternalRequestType attribute value.
var MapAttributeMemoryStateUsedFree = map[string]AttributeMemoryStateUsedFree{ "used": AttributeMemoryStateUsedFreeUsed, "free": AttributeMemoryStateUsedFreeFree, }
MapAttributeMemoryStateUsedFree is a helper map of string to AttributeMemoryStateUsedFree attribute value.
var MapAttributeRowMemoryType = map[string]AttributeRowMemoryType{ "fixed": AttributeRowMemoryTypeFixed, "variable": AttributeRowMemoryTypeVariable, }
MapAttributeRowMemoryType is a helper map of string to AttributeRowMemoryType attribute value.
var MapAttributeSchemaMemoryType = map[string]AttributeSchemaMemoryType{ "main": AttributeSchemaMemoryTypeMain, "delta": AttributeSchemaMemoryTypeDelta, "history_main": AttributeSchemaMemoryTypeHistoryMain, "history_delta": AttributeSchemaMemoryTypeHistoryDelta, }
MapAttributeSchemaMemoryType is a helper map of string to AttributeSchemaMemoryType attribute value.
var MapAttributeSchemaOperationType = map[string]AttributeSchemaOperationType{ "read": AttributeSchemaOperationTypeRead, "write": AttributeSchemaOperationTypeWrite, "merge": AttributeSchemaOperationTypeMerge, }
MapAttributeSchemaOperationType is a helper map of string to AttributeSchemaOperationType attribute value.
var MapAttributeSchemaRecordType = map[string]AttributeSchemaRecordType{ "main": AttributeSchemaRecordTypeMain, "delta": AttributeSchemaRecordTypeDelta, "history_main": AttributeSchemaRecordTypeHistoryMain, "history_delta": AttributeSchemaRecordTypeHistoryDelta, }
MapAttributeSchemaRecordType is a helper map of string to AttributeSchemaRecordType attribute value.
var MapAttributeServiceMemoryUsedType = map[string]AttributeServiceMemoryUsedType{ "logical": AttributeServiceMemoryUsedTypeLogical, "physical": AttributeServiceMemoryUsedTypePhysical, }
MapAttributeServiceMemoryUsedType is a helper map of string to AttributeServiceMemoryUsedType attribute value.
var MapAttributeServiceStatus = map[string]AttributeServiceStatus{ "active": AttributeServiceStatusActive, "inactive": AttributeServiceStatusInactive, }
MapAttributeServiceStatus is a helper map of string to AttributeServiceStatus attribute value.
var MapAttributeThreadStatus = map[string]AttributeThreadStatus{ "active": AttributeThreadStatusActive, "inactive": AttributeThreadStatusInactive, }
MapAttributeThreadStatus is a helper map of string to AttributeThreadStatus attribute value.
var MapAttributeTransactionType = map[string]AttributeTransactionType{ "update": AttributeTransactionTypeUpdate, "commit": AttributeTransactionTypeCommit, "rollback": AttributeTransactionTypeRollback, }
MapAttributeTransactionType is a helper map of string to AttributeTransactionType attribute value.
var MapAttributeVolumeOperationType = map[string]AttributeVolumeOperationType{ "read": AttributeVolumeOperationTypeRead, "write": AttributeVolumeOperationTypeWrite, }
MapAttributeVolumeOperationType is a helper map of string to AttributeVolumeOperationType attribute value.
Functions ¶
func WithStartTime ¶
WithStartTime sets startTime on the metrics builder.
Types ¶
type AttributeActivePendingRequestState ¶
type AttributeActivePendingRequestState int
AttributeActivePendingRequestState specifies the a value active_pending_request_state attribute.
const ( AttributeActivePendingRequestStateActive AttributeActivePendingRequestState AttributeActivePendingRequestStatePending )
func (AttributeActivePendingRequestState) String ¶
func (av AttributeActivePendingRequestState) String() string
String returns the string representation of the AttributeActivePendingRequestState.
type AttributeCPUType ¶
type AttributeCPUType int
AttributeCPUType specifies the a value cpu_type attribute.
const ( AttributeCPUTypeUser AttributeCPUType AttributeCPUTypeSystem AttributeCPUTypeIoWait AttributeCPUTypeIdle )
func (AttributeCPUType) String ¶
func (av AttributeCPUType) String() string
String returns the string representation of the AttributeCPUType.
type AttributeColumnMemorySubtype ¶
type AttributeColumnMemorySubtype int
AttributeColumnMemorySubtype specifies the a value column_memory_subtype attribute.
const ( AttributeColumnMemorySubtypeData AttributeColumnMemorySubtype AttributeColumnMemorySubtypeDict AttributeColumnMemorySubtypeIndex AttributeColumnMemorySubtypeMisc )
func (AttributeColumnMemorySubtype) String ¶
func (av AttributeColumnMemorySubtype) String() string
String returns the string representation of the AttributeColumnMemorySubtype.
type AttributeColumnMemoryType ¶
type AttributeColumnMemoryType int
AttributeColumnMemoryType specifies the a value column_memory_type attribute.
const ( AttributeColumnMemoryTypeMain AttributeColumnMemoryType AttributeColumnMemoryTypeDelta )
func (AttributeColumnMemoryType) String ¶
func (av AttributeColumnMemoryType) String() string
String returns the string representation of the AttributeColumnMemoryType.
type AttributeConnectionStatus ¶
type AttributeConnectionStatus int
AttributeConnectionStatus specifies the a value connection_status attribute.
const ( AttributeConnectionStatusRunning AttributeConnectionStatus AttributeConnectionStatusIdle AttributeConnectionStatusQueueing )
func (AttributeConnectionStatus) String ¶
func (av AttributeConnectionStatus) String() string
String returns the string representation of the AttributeConnectionStatus.
type AttributeDiskStateUsedFree ¶
type AttributeDiskStateUsedFree int
AttributeDiskStateUsedFree specifies the a value disk_state_used_free attribute.
const ( AttributeDiskStateUsedFreeUsed AttributeDiskStateUsedFree AttributeDiskStateUsedFreeFree )
func (AttributeDiskStateUsedFree) String ¶
func (av AttributeDiskStateUsedFree) String() string
String returns the string representation of the AttributeDiskStateUsedFree.
type AttributeHostSwapState ¶
type AttributeHostSwapState int
AttributeHostSwapState specifies the a value host_swap_state attribute.
const ( AttributeHostSwapStateUsed AttributeHostSwapState AttributeHostSwapStateFree )
func (AttributeHostSwapState) String ¶
func (av AttributeHostSwapState) String() string
String returns the string representation of the AttributeHostSwapState.
type AttributeInternalExternalRequestType ¶
type AttributeInternalExternalRequestType int
AttributeInternalExternalRequestType specifies the a value internal_external_request_type attribute.
const ( AttributeInternalExternalRequestTypeInternal AttributeInternalExternalRequestType AttributeInternalExternalRequestTypeExternal )
func (AttributeInternalExternalRequestType) String ¶
func (av AttributeInternalExternalRequestType) String() string
String returns the string representation of the AttributeInternalExternalRequestType.
type AttributeMemoryStateUsedFree ¶
type AttributeMemoryStateUsedFree int
AttributeMemoryStateUsedFree specifies the a value memory_state_used_free attribute.
const ( AttributeMemoryStateUsedFreeUsed AttributeMemoryStateUsedFree AttributeMemoryStateUsedFreeFree )
func (AttributeMemoryStateUsedFree) String ¶
func (av AttributeMemoryStateUsedFree) String() string
String returns the string representation of the AttributeMemoryStateUsedFree.
type AttributeRowMemoryType ¶
type AttributeRowMemoryType int
AttributeRowMemoryType specifies the a value row_memory_type attribute.
const ( AttributeRowMemoryTypeFixed AttributeRowMemoryType AttributeRowMemoryTypeVariable )
func (AttributeRowMemoryType) String ¶
func (av AttributeRowMemoryType) String() string
String returns the string representation of the AttributeRowMemoryType.
type AttributeSchemaMemoryType ¶
type AttributeSchemaMemoryType int
AttributeSchemaMemoryType specifies the a value schema_memory_type attribute.
const ( AttributeSchemaMemoryTypeMain AttributeSchemaMemoryType AttributeSchemaMemoryTypeDelta AttributeSchemaMemoryTypeHistoryMain AttributeSchemaMemoryTypeHistoryDelta )
func (AttributeSchemaMemoryType) String ¶
func (av AttributeSchemaMemoryType) String() string
String returns the string representation of the AttributeSchemaMemoryType.
type AttributeSchemaOperationType ¶
type AttributeSchemaOperationType int
AttributeSchemaOperationType specifies the a value schema_operation_type attribute.
const ( AttributeSchemaOperationTypeRead AttributeSchemaOperationType AttributeSchemaOperationTypeWrite AttributeSchemaOperationTypeMerge )
func (AttributeSchemaOperationType) String ¶
func (av AttributeSchemaOperationType) String() string
String returns the string representation of the AttributeSchemaOperationType.
type AttributeSchemaRecordType ¶
type AttributeSchemaRecordType int
AttributeSchemaRecordType specifies the a value schema_record_type attribute.
const ( AttributeSchemaRecordTypeMain AttributeSchemaRecordType AttributeSchemaRecordTypeDelta AttributeSchemaRecordTypeHistoryMain AttributeSchemaRecordTypeHistoryDelta )
func (AttributeSchemaRecordType) String ¶
func (av AttributeSchemaRecordType) String() string
String returns the string representation of the AttributeSchemaRecordType.
type AttributeServiceMemoryUsedType ¶
type AttributeServiceMemoryUsedType int
AttributeServiceMemoryUsedType specifies the a value service_memory_used_type attribute.
const ( AttributeServiceMemoryUsedTypeLogical AttributeServiceMemoryUsedType AttributeServiceMemoryUsedTypePhysical )
func (AttributeServiceMemoryUsedType) String ¶
func (av AttributeServiceMemoryUsedType) String() string
String returns the string representation of the AttributeServiceMemoryUsedType.
type AttributeServiceStatus ¶
type AttributeServiceStatus int
AttributeServiceStatus specifies the a value service_status attribute.
const ( AttributeServiceStatusActive AttributeServiceStatus AttributeServiceStatusInactive )
func (AttributeServiceStatus) String ¶
func (av AttributeServiceStatus) String() string
String returns the string representation of the AttributeServiceStatus.
type AttributeThreadStatus ¶
type AttributeThreadStatus int
AttributeThreadStatus specifies the a value thread_status attribute.
const ( AttributeThreadStatusActive AttributeThreadStatus AttributeThreadStatusInactive )
func (AttributeThreadStatus) String ¶
func (av AttributeThreadStatus) String() string
String returns the string representation of the AttributeThreadStatus.
type AttributeTransactionType ¶
type AttributeTransactionType int
AttributeTransactionType specifies the a value transaction_type attribute.
const ( AttributeTransactionTypeUpdate AttributeTransactionType AttributeTransactionTypeCommit AttributeTransactionTypeRollback )
func (AttributeTransactionType) String ¶
func (av AttributeTransactionType) String() string
String returns the string representation of the AttributeTransactionType.
type AttributeVolumeOperationType ¶
type AttributeVolumeOperationType int
AttributeVolumeOperationType specifies the a value volume_operation_type attribute.
const ( AttributeVolumeOperationTypeRead AttributeVolumeOperationType AttributeVolumeOperationTypeWrite )
func (AttributeVolumeOperationType) String ¶
func (av AttributeVolumeOperationType) String() string
String returns the string representation of the AttributeVolumeOperationType.
type MetricSettings ¶
type MetricSettings struct { Enabled bool `mapstructure:"enabled"` // contains filtered or unexported fields }
MetricSettings provides common settings for a particular metric.
type MetricsBuilder ¶
type MetricsBuilder struct {
// contains filtered or unexported fields
}
MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations required to produce metric representation defined in metadata and user settings.
func NewMetricsBuilder ¶
func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder
func (*MetricsBuilder) Emit ¶
func (mb *MetricsBuilder) Emit(rmo ...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 settings, e.g. delta or cumulative.
func (*MetricsBuilder) EmitForResource ¶
func (mb *MetricsBuilder) EmitForResource(rmo ...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) RecordSaphanaAlertCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaAlertCountDataPoint(ts pcommon.Timestamp, inputVal string, alertRatingAttributeValue string) error
RecordSaphanaAlertCountDataPoint adds a data point to saphana.alert.count metric.
func (*MetricsBuilder) RecordSaphanaBackupLatestDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaBackupLatestDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordSaphanaBackupLatestDataPoint adds a data point to saphana.backup.latest metric.
func (*MetricsBuilder) RecordSaphanaCPUUsedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaCPUUsedDataPoint(ts pcommon.Timestamp, inputVal string, cpuTypeAttributeValue AttributeCPUType) error
RecordSaphanaCPUUsedDataPoint adds a data point to saphana.cpu.used metric.
func (*MetricsBuilder) RecordSaphanaColumnMemoryUsedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaColumnMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, columnMemoryTypeAttributeValue AttributeColumnMemoryType, columnMemorySubtypeAttributeValue AttributeColumnMemorySubtype) error
RecordSaphanaColumnMemoryUsedDataPoint adds a data point to saphana.column.memory.used metric.
func (*MetricsBuilder) RecordSaphanaComponentMemoryUsedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaComponentMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, componentAttributeValue string) error
RecordSaphanaComponentMemoryUsedDataPoint adds a data point to saphana.component.memory.used metric.
func (*MetricsBuilder) RecordSaphanaConnectionCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaConnectionCountDataPoint(ts pcommon.Timestamp, inputVal string, connectionStatusAttributeValue AttributeConnectionStatus) error
RecordSaphanaConnectionCountDataPoint adds a data point to saphana.connection.count metric.
func (*MetricsBuilder) RecordSaphanaDiskSizeCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaDiskSizeCurrentDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, diskUsageTypeAttributeValue string, diskStateUsedFreeAttributeValue AttributeDiskStateUsedFree) error
RecordSaphanaDiskSizeCurrentDataPoint adds a data point to saphana.disk.size.current metric.
func (*MetricsBuilder) RecordSaphanaHostMemoryCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaHostMemoryCurrentDataPoint(ts pcommon.Timestamp, inputVal string, memoryStateUsedFreeAttributeValue AttributeMemoryStateUsedFree) error
RecordSaphanaHostMemoryCurrentDataPoint adds a data point to saphana.host.memory.current metric.
func (*MetricsBuilder) RecordSaphanaHostSwapCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaHostSwapCurrentDataPoint(ts pcommon.Timestamp, inputVal string, hostSwapStateAttributeValue AttributeHostSwapState) error
RecordSaphanaHostSwapCurrentDataPoint adds a data point to saphana.host.swap.current metric.
func (*MetricsBuilder) RecordSaphanaInstanceCodeSizeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaInstanceCodeSizeDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordSaphanaInstanceCodeSizeDataPoint adds a data point to saphana.instance.code_size metric.
func (*MetricsBuilder) RecordSaphanaInstanceMemoryCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaInstanceMemoryCurrentDataPoint(ts pcommon.Timestamp, inputVal string, memoryStateUsedFreeAttributeValue AttributeMemoryStateUsedFree) error
RecordSaphanaInstanceMemoryCurrentDataPoint adds a data point to saphana.instance.memory.current metric.
func (*MetricsBuilder) RecordSaphanaInstanceMemorySharedAllocatedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaInstanceMemorySharedAllocatedDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordSaphanaInstanceMemorySharedAllocatedDataPoint adds a data point to saphana.instance.memory.shared.allocated metric.
func (*MetricsBuilder) RecordSaphanaInstanceMemoryUsedPeakDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaInstanceMemoryUsedPeakDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordSaphanaInstanceMemoryUsedPeakDataPoint adds a data point to saphana.instance.memory.used.peak metric.
func (*MetricsBuilder) RecordSaphanaLicenseExpirationTimeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaLicenseExpirationTimeDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, productAttributeValue string) error
RecordSaphanaLicenseExpirationTimeDataPoint adds a data point to saphana.license.expiration.time metric.
func (*MetricsBuilder) RecordSaphanaLicenseLimitDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaLicenseLimitDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, productAttributeValue string) error
RecordSaphanaLicenseLimitDataPoint adds a data point to saphana.license.limit metric.
func (*MetricsBuilder) RecordSaphanaLicensePeakDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaLicensePeakDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, productAttributeValue string) error
RecordSaphanaLicensePeakDataPoint adds a data point to saphana.license.peak metric.
func (*MetricsBuilder) RecordSaphanaNetworkRequestAverageTimeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaNetworkRequestAverageTimeDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordSaphanaNetworkRequestAverageTimeDataPoint adds a data point to saphana.network.request.average_time metric.
func (*MetricsBuilder) RecordSaphanaNetworkRequestCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaNetworkRequestCountDataPoint(ts pcommon.Timestamp, inputVal string, activePendingRequestStateAttributeValue AttributeActivePendingRequestState) error
RecordSaphanaNetworkRequestCountDataPoint adds a data point to saphana.network.request.count metric.
func (*MetricsBuilder) RecordSaphanaNetworkRequestFinishedCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaNetworkRequestFinishedCountDataPoint(ts pcommon.Timestamp, inputVal string, internalExternalRequestTypeAttributeValue AttributeInternalExternalRequestType) error
RecordSaphanaNetworkRequestFinishedCountDataPoint adds a data point to saphana.network.request.finished.count metric.
func (*MetricsBuilder) RecordSaphanaReplicationAverageTimeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaReplicationAverageTimeDataPoint(ts pcommon.Timestamp, inputVal string, primaryHostAttributeValue string, secondaryHostAttributeValue string, portAttributeValue string, replicationModeAttributeValue string) error
RecordSaphanaReplicationAverageTimeDataPoint adds a data point to saphana.replication.average_time metric.
func (*MetricsBuilder) RecordSaphanaReplicationBacklogSizeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaReplicationBacklogSizeDataPoint(ts pcommon.Timestamp, inputVal string, primaryHostAttributeValue string, secondaryHostAttributeValue string, portAttributeValue string, replicationModeAttributeValue string) error
RecordSaphanaReplicationBacklogSizeDataPoint adds a data point to saphana.replication.backlog.size metric.
func (*MetricsBuilder) RecordSaphanaReplicationBacklogTimeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaReplicationBacklogTimeDataPoint(ts pcommon.Timestamp, inputVal string, primaryHostAttributeValue string, secondaryHostAttributeValue string, portAttributeValue string, replicationModeAttributeValue string) error
RecordSaphanaReplicationBacklogTimeDataPoint adds a data point to saphana.replication.backlog.time metric.
func (*MetricsBuilder) RecordSaphanaRowStoreMemoryUsedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaRowStoreMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, rowMemoryTypeAttributeValue AttributeRowMemoryType) error
RecordSaphanaRowStoreMemoryUsedDataPoint adds a data point to saphana.row_store.memory.used metric.
func (*MetricsBuilder) RecordSaphanaSchemaMemoryUsedCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaSchemaMemoryUsedCurrentDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string, schemaMemoryTypeAttributeValue AttributeSchemaMemoryType) error
RecordSaphanaSchemaMemoryUsedCurrentDataPoint adds a data point to saphana.schema.memory.used.current metric.
func (*MetricsBuilder) RecordSaphanaSchemaMemoryUsedMaxDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaSchemaMemoryUsedMaxDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string) error
RecordSaphanaSchemaMemoryUsedMaxDataPoint adds a data point to saphana.schema.memory.used.max metric.
func (*MetricsBuilder) RecordSaphanaSchemaOperationCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaSchemaOperationCountDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string, schemaOperationTypeAttributeValue AttributeSchemaOperationType) error
RecordSaphanaSchemaOperationCountDataPoint adds a data point to saphana.schema.operation.count metric.
func (*MetricsBuilder) RecordSaphanaSchemaRecordCompressedCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaSchemaRecordCompressedCountDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string) error
RecordSaphanaSchemaRecordCompressedCountDataPoint adds a data point to saphana.schema.record.compressed.count metric.
func (*MetricsBuilder) RecordSaphanaSchemaRecordCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaSchemaRecordCountDataPoint(ts pcommon.Timestamp, inputVal string, schemaAttributeValue string, schemaRecordTypeAttributeValue AttributeSchemaRecordType) error
RecordSaphanaSchemaRecordCountDataPoint adds a data point to saphana.schema.record.count metric.
func (*MetricsBuilder) RecordSaphanaServiceCodeSizeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceCodeSizeDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
RecordSaphanaServiceCodeSizeDataPoint adds a data point to saphana.service.code_size metric.
func (*MetricsBuilder) RecordSaphanaServiceCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceCountDataPoint(ts pcommon.Timestamp, inputVal string, serviceStatusAttributeValue AttributeServiceStatus) error
RecordSaphanaServiceCountDataPoint adds a data point to saphana.service.count metric.
func (*MetricsBuilder) RecordSaphanaServiceMemoryCompactorsAllocatedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemoryCompactorsAllocatedDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
RecordSaphanaServiceMemoryCompactorsAllocatedDataPoint adds a data point to saphana.service.memory.compactors.allocated metric.
func (*MetricsBuilder) RecordSaphanaServiceMemoryCompactorsFreeableDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemoryCompactorsFreeableDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
RecordSaphanaServiceMemoryCompactorsFreeableDataPoint adds a data point to saphana.service.memory.compactors.freeable metric.
func (*MetricsBuilder) RecordSaphanaServiceMemoryEffectiveLimitDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemoryEffectiveLimitDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
RecordSaphanaServiceMemoryEffectiveLimitDataPoint adds a data point to saphana.service.memory.effective_limit metric.
func (*MetricsBuilder) RecordSaphanaServiceMemoryHeapCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemoryHeapCurrentDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string, memoryStateUsedFreeAttributeValue AttributeMemoryStateUsedFree) error
RecordSaphanaServiceMemoryHeapCurrentDataPoint adds a data point to saphana.service.memory.heap.current metric.
func (*MetricsBuilder) RecordSaphanaServiceMemoryLimitDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemoryLimitDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
RecordSaphanaServiceMemoryLimitDataPoint adds a data point to saphana.service.memory.limit metric.
func (*MetricsBuilder) RecordSaphanaServiceMemorySharedCurrentDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemorySharedCurrentDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string, memoryStateUsedFreeAttributeValue AttributeMemoryStateUsedFree) error
RecordSaphanaServiceMemorySharedCurrentDataPoint adds a data point to saphana.service.memory.shared.current metric.
func (*MetricsBuilder) RecordSaphanaServiceMemoryUsedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceMemoryUsedDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string, serviceMemoryUsedTypeAttributeValue AttributeServiceMemoryUsedType) error
RecordSaphanaServiceMemoryUsedDataPoint adds a data point to saphana.service.memory.used metric.
func (*MetricsBuilder) RecordSaphanaServiceStackSizeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceStackSizeDataPoint(ts pcommon.Timestamp, inputVal string, serviceAttributeValue string) error
RecordSaphanaServiceStackSizeDataPoint adds a data point to saphana.service.stack_size metric.
func (*MetricsBuilder) RecordSaphanaServiceThreadCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaServiceThreadCountDataPoint(ts pcommon.Timestamp, inputVal string, threadStatusAttributeValue AttributeThreadStatus) error
RecordSaphanaServiceThreadCountDataPoint adds a data point to saphana.service.thread.count metric.
func (*MetricsBuilder) RecordSaphanaTransactionBlockedDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaTransactionBlockedDataPoint(ts pcommon.Timestamp, inputVal string) error
RecordSaphanaTransactionBlockedDataPoint adds a data point to saphana.transaction.blocked metric.
func (*MetricsBuilder) RecordSaphanaTransactionCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaTransactionCountDataPoint(ts pcommon.Timestamp, inputVal string, transactionTypeAttributeValue AttributeTransactionType) error
RecordSaphanaTransactionCountDataPoint adds a data point to saphana.transaction.count metric.
func (*MetricsBuilder) RecordSaphanaUptimeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaUptimeDataPoint(ts pcommon.Timestamp, inputVal string, systemAttributeValue string, databaseAttributeValue string) error
RecordSaphanaUptimeDataPoint adds a data point to saphana.uptime metric.
func (*MetricsBuilder) RecordSaphanaVolumeOperationCountDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaVolumeOperationCountDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, diskUsageTypeAttributeValue string, volumeOperationTypeAttributeValue AttributeVolumeOperationType) error
RecordSaphanaVolumeOperationCountDataPoint adds a data point to saphana.volume.operation.count metric.
func (*MetricsBuilder) RecordSaphanaVolumeOperationSizeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaVolumeOperationSizeDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, diskUsageTypeAttributeValue string, volumeOperationTypeAttributeValue AttributeVolumeOperationType) error
RecordSaphanaVolumeOperationSizeDataPoint adds a data point to saphana.volume.operation.size metric.
func (*MetricsBuilder) RecordSaphanaVolumeOperationTimeDataPoint ¶
func (mb *MetricsBuilder) RecordSaphanaVolumeOperationTimeDataPoint(ts pcommon.Timestamp, inputVal string, pathAttributeValue string, diskUsageTypeAttributeValue string, volumeOperationTypeAttributeValue AttributeVolumeOperationType) error
RecordSaphanaVolumeOperationTimeDataPoint adds a data point to saphana.volume.operation.time metric.
func (*MetricsBuilder) Reset ¶
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 MetricsSettings `mapstructure:"metrics"` ResourceAttributes ResourceAttributesSettings `mapstructure:"resource_attributes"` }
MetricsBuilderConfig is a structural subset of an otherwise 1-1 copy of metadata.yaml
func DefaultMetricsBuilderConfig ¶ added in v0.73.0
func DefaultMetricsBuilderConfig() MetricsBuilderConfig
func NewMetricsBuilderConfig ¶ added in v0.73.0
func NewMetricsBuilderConfig(ms MetricsSettings, ras ResourceAttributesSettings) MetricsBuilderConfig
type MetricsSettings ¶
type MetricsSettings struct { SaphanaAlertCount MetricSettings `mapstructure:"saphana.alert.count"` SaphanaBackupLatest MetricSettings `mapstructure:"saphana.backup.latest"` SaphanaColumnMemoryUsed MetricSettings `mapstructure:"saphana.column.memory.used"` SaphanaComponentMemoryUsed MetricSettings `mapstructure:"saphana.component.memory.used"` SaphanaConnectionCount MetricSettings `mapstructure:"saphana.connection.count"` SaphanaCPUUsed MetricSettings `mapstructure:"saphana.cpu.used"` SaphanaDiskSizeCurrent MetricSettings `mapstructure:"saphana.disk.size.current"` SaphanaHostMemoryCurrent MetricSettings `mapstructure:"saphana.host.memory.current"` SaphanaHostSwapCurrent MetricSettings `mapstructure:"saphana.host.swap.current"` SaphanaInstanceCodeSize MetricSettings `mapstructure:"saphana.instance.code_size"` SaphanaInstanceMemoryCurrent MetricSettings `mapstructure:"saphana.instance.memory.current"` SaphanaInstanceMemoryUsedPeak MetricSettings `mapstructure:"saphana.instance.memory.used.peak"` SaphanaLicenseExpirationTime MetricSettings `mapstructure:"saphana.license.expiration.time"` SaphanaLicenseLimit MetricSettings `mapstructure:"saphana.license.limit"` SaphanaLicensePeak MetricSettings `mapstructure:"saphana.license.peak"` SaphanaNetworkRequestAverageTime MetricSettings `mapstructure:"saphana.network.request.average_time"` SaphanaNetworkRequestCount MetricSettings `mapstructure:"saphana.network.request.count"` SaphanaNetworkRequestFinishedCount MetricSettings `mapstructure:"saphana.network.request.finished.count"` SaphanaReplicationAverageTime MetricSettings `mapstructure:"saphana.replication.average_time"` SaphanaReplicationBacklogSize MetricSettings `mapstructure:"saphana.replication.backlog.size"` SaphanaReplicationBacklogTime MetricSettings `mapstructure:"saphana.replication.backlog.time"` SaphanaRowStoreMemoryUsed MetricSettings `mapstructure:"saphana.row_store.memory.used"` SaphanaSchemaMemoryUsedCurrent MetricSettings `mapstructure:"saphana.schema.memory.used.current"` SaphanaSchemaMemoryUsedMax MetricSettings `mapstructure:"saphana.schema.memory.used.max"` SaphanaSchemaOperationCount MetricSettings `mapstructure:"saphana.schema.operation.count"` SaphanaSchemaRecordCompressedCount MetricSettings `mapstructure:"saphana.schema.record.compressed.count"` SaphanaSchemaRecordCount MetricSettings `mapstructure:"saphana.schema.record.count"` SaphanaServiceCodeSize MetricSettings `mapstructure:"saphana.service.code_size"` SaphanaServiceCount MetricSettings `mapstructure:"saphana.service.count"` SaphanaServiceMemoryCompactorsAllocated MetricSettings `mapstructure:"saphana.service.memory.compactors.allocated"` SaphanaServiceMemoryCompactorsFreeable MetricSettings `mapstructure:"saphana.service.memory.compactors.freeable"` SaphanaServiceMemoryEffectiveLimit MetricSettings `mapstructure:"saphana.service.memory.effective_limit"` SaphanaServiceMemoryHeapCurrent MetricSettings `mapstructure:"saphana.service.memory.heap.current"` SaphanaServiceMemoryLimit MetricSettings `mapstructure:"saphana.service.memory.limit"` SaphanaServiceMemoryUsed MetricSettings `mapstructure:"saphana.service.memory.used"` SaphanaServiceStackSize MetricSettings `mapstructure:"saphana.service.stack_size"` SaphanaServiceThreadCount MetricSettings `mapstructure:"saphana.service.thread.count"` SaphanaTransactionBlocked MetricSettings `mapstructure:"saphana.transaction.blocked"` SaphanaTransactionCount MetricSettings `mapstructure:"saphana.transaction.count"` SaphanaUptime MetricSettings `mapstructure:"saphana.uptime"` SaphanaVolumeOperationCount MetricSettings `mapstructure:"saphana.volume.operation.count"` SaphanaVolumeOperationSize MetricSettings `mapstructure:"saphana.volume.operation.size"` SaphanaVolumeOperationTime MetricSettings `mapstructure:"saphana.volume.operation.time"` }
MetricsSettings provides settings for saphanareceiver metrics.
func DefaultMetricsSettings ¶
func DefaultMetricsSettings() MetricsSettings
type ResourceAttributeSettings ¶ added in v0.70.0
type ResourceAttributeSettings struct {
Enabled bool `mapstructure:"enabled"`
}
ResourceAttributeSettings provides common settings for a particular metric.
type ResourceAttributesSettings ¶ added in v0.70.0
type ResourceAttributesSettings struct { DbSystem ResourceAttributeSettings `mapstructure:"db.system"` SaphanaHost ResourceAttributeSettings `mapstructure:"saphana.host"` }
ResourceAttributesSettings provides settings for saphanareceiver metrics.
func DefaultResourceAttributesSettings ¶ added in v0.70.0
func DefaultResourceAttributesSettings() ResourceAttributesSettings
type ResourceMetricsOption ¶ added in v0.52.0
type ResourceMetricsOption func(ResourceAttributesSettings, pmetric.ResourceMetrics)
ResourceMetricsOption applies changes to provided resource metrics.
func WithDbSystem ¶
func WithDbSystem(val string) ResourceMetricsOption
WithDbSystem sets provided value as "db.system" attribute for current resource.
func WithSaphanaHost ¶
func WithSaphanaHost(val string) ResourceMetricsOption
WithSaphanaHost sets provided value as "saphana.host" attribute for current 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.