metadata

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsStability = component.StabilityLevelDevelopment
)

Variables

MapAttributeActivePendingRequestState is a helper map of string to AttributeActivePendingRequestState attribute value.

View Source
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.

MapAttributeColumnMemorySubtype is a helper map of string to AttributeColumnMemorySubtype attribute value.

MapAttributeColumnMemoryType is a helper map of string to AttributeColumnMemoryType attribute value.

MapAttributeConnectionStatus is a helper map of string to AttributeConnectionStatus attribute value.

MapAttributeDiskStateUsedFree is a helper map of string to AttributeDiskStateUsedFree attribute value.

View Source
var MapAttributeHostSwapState = map[string]AttributeHostSwapState{
	"used": AttributeHostSwapStateUsed,
	"free": AttributeHostSwapStateFree,
}

MapAttributeHostSwapState is a helper map of string to AttributeHostSwapState attribute value.

MapAttributeInternalExternalRequestType is a helper map of string to AttributeInternalExternalRequestType attribute value.

MapAttributeMemoryStateUsedFree is a helper map of string to AttributeMemoryStateUsedFree attribute value.

View Source
var MapAttributeRowMemoryType = map[string]AttributeRowMemoryType{
	"fixed":    AttributeRowMemoryTypeFixed,
	"variable": AttributeRowMemoryTypeVariable,
}

MapAttributeRowMemoryType is a helper map of string to AttributeRowMemoryType attribute value.

MapAttributeSchemaMemoryType is a helper map of string to AttributeSchemaMemoryType attribute value.

MapAttributeSchemaOperationType is a helper map of string to AttributeSchemaOperationType attribute value.

MapAttributeSchemaRecordType is a helper map of string to AttributeSchemaRecordType attribute value.

MapAttributeServiceMemoryUsedType is a helper map of string to AttributeServiceMemoryUsedType attribute value.

View Source
var MapAttributeServiceStatus = map[string]AttributeServiceStatus{
	"active":   AttributeServiceStatusActive,
	"inactive": AttributeServiceStatusInactive,
}

MapAttributeServiceStatus is a helper map of string to AttributeServiceStatus attribute value.

View Source
var MapAttributeThreadStatus = map[string]AttributeThreadStatus{
	"active":   AttributeThreadStatusActive,
	"inactive": AttributeThreadStatusInactive,
}

MapAttributeThreadStatus is a helper map of string to AttributeThreadStatus attribute value.

MapAttributeTransactionType is a helper map of string to AttributeTransactionType attribute value.

MapAttributeVolumeOperationType is a helper map of string to AttributeVolumeOperationType attribute value.

View Source
var (
	Type = component.MustNewType("saphana")
)

Functions

func Meter added in v0.92.0

func Meter(settings component.TelemetrySettings) metric.Meter

func Tracer added in v0.92.0

func Tracer(settings component.TelemetrySettings) trace.Tracer

func WithStartTime

func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption

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

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

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

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

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

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

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

String returns the string representation of the AttributeVolumeOperationType.

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.

func (*MetricConfig) Unmarshal added in v0.77.0

func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error

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 config.

func NewMetricsBuilder

func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSettings, options ...metricBuilderOption) *MetricsBuilder

func (*MetricsBuilder) Emit

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

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) 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) 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            MetricsConfig            `mapstructure:"metrics"`
	ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"`
}

MetricsBuilderConfig is a configuration for saphana metrics builder.

func DefaultMetricsBuilderConfig added in v0.73.0

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig added in v0.77.0

type MetricsConfig struct {
	SaphanaAlertCount                       MetricConfig `mapstructure:"saphana.alert.count"`
	SaphanaBackupLatest                     MetricConfig `mapstructure:"saphana.backup.latest"`
	SaphanaColumnMemoryUsed                 MetricConfig `mapstructure:"saphana.column.memory.used"`
	SaphanaComponentMemoryUsed              MetricConfig `mapstructure:"saphana.component.memory.used"`
	SaphanaConnectionCount                  MetricConfig `mapstructure:"saphana.connection.count"`
	SaphanaCPUUsed                          MetricConfig `mapstructure:"saphana.cpu.used"`
	SaphanaDiskSizeCurrent                  MetricConfig `mapstructure:"saphana.disk.size.current"`
	SaphanaHostMemoryCurrent                MetricConfig `mapstructure:"saphana.host.memory.current"`
	SaphanaHostSwapCurrent                  MetricConfig `mapstructure:"saphana.host.swap.current"`
	SaphanaInstanceCodeSize                 MetricConfig `mapstructure:"saphana.instance.code_size"`
	SaphanaInstanceMemoryCurrent            MetricConfig `mapstructure:"saphana.instance.memory.current"`
	SaphanaInstanceMemorySharedAllocated    MetricConfig `mapstructure:"saphana.instance.memory.shared.allocated"`
	SaphanaInstanceMemoryUsedPeak           MetricConfig `mapstructure:"saphana.instance.memory.used.peak"`
	SaphanaLicenseExpirationTime            MetricConfig `mapstructure:"saphana.license.expiration.time"`
	SaphanaLicenseLimit                     MetricConfig `mapstructure:"saphana.license.limit"`
	SaphanaLicensePeak                      MetricConfig `mapstructure:"saphana.license.peak"`
	SaphanaNetworkRequestAverageTime        MetricConfig `mapstructure:"saphana.network.request.average_time"`
	SaphanaNetworkRequestCount              MetricConfig `mapstructure:"saphana.network.request.count"`
	SaphanaNetworkRequestFinishedCount      MetricConfig `mapstructure:"saphana.network.request.finished.count"`
	SaphanaReplicationAverageTime           MetricConfig `mapstructure:"saphana.replication.average_time"`
	SaphanaReplicationBacklogSize           MetricConfig `mapstructure:"saphana.replication.backlog.size"`
	SaphanaReplicationBacklogTime           MetricConfig `mapstructure:"saphana.replication.backlog.time"`
	SaphanaRowStoreMemoryUsed               MetricConfig `mapstructure:"saphana.row_store.memory.used"`
	SaphanaSchemaMemoryUsedCurrent          MetricConfig `mapstructure:"saphana.schema.memory.used.current"`
	SaphanaSchemaMemoryUsedMax              MetricConfig `mapstructure:"saphana.schema.memory.used.max"`
	SaphanaSchemaOperationCount             MetricConfig `mapstructure:"saphana.schema.operation.count"`
	SaphanaSchemaRecordCompressedCount      MetricConfig `mapstructure:"saphana.schema.record.compressed.count"`
	SaphanaSchemaRecordCount                MetricConfig `mapstructure:"saphana.schema.record.count"`
	SaphanaServiceCodeSize                  MetricConfig `mapstructure:"saphana.service.code_size"`
	SaphanaServiceCount                     MetricConfig `mapstructure:"saphana.service.count"`
	SaphanaServiceMemoryCompactorsAllocated MetricConfig `mapstructure:"saphana.service.memory.compactors.allocated"`
	SaphanaServiceMemoryCompactorsFreeable  MetricConfig `mapstructure:"saphana.service.memory.compactors.freeable"`
	SaphanaServiceMemoryEffectiveLimit      MetricConfig `mapstructure:"saphana.service.memory.effective_limit"`
	SaphanaServiceMemoryHeapCurrent         MetricConfig `mapstructure:"saphana.service.memory.heap.current"`
	SaphanaServiceMemoryLimit               MetricConfig `mapstructure:"saphana.service.memory.limit"`
	SaphanaServiceMemorySharedCurrent       MetricConfig `mapstructure:"saphana.service.memory.shared.current"`
	SaphanaServiceMemoryUsed                MetricConfig `mapstructure:"saphana.service.memory.used"`
	SaphanaServiceStackSize                 MetricConfig `mapstructure:"saphana.service.stack_size"`
	SaphanaServiceThreadCount               MetricConfig `mapstructure:"saphana.service.thread.count"`
	SaphanaTransactionBlocked               MetricConfig `mapstructure:"saphana.transaction.blocked"`
	SaphanaTransactionCount                 MetricConfig `mapstructure:"saphana.transaction.count"`
	SaphanaUptime                           MetricConfig `mapstructure:"saphana.uptime"`
	SaphanaVolumeOperationCount             MetricConfig `mapstructure:"saphana.volume.operation.count"`
	SaphanaVolumeOperationSize              MetricConfig `mapstructure:"saphana.volume.operation.size"`
	SaphanaVolumeOperationTime              MetricConfig `mapstructure:"saphana.volume.operation.time"`
}

MetricsConfig provides config for saphana 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.

func (*ResourceAttributeConfig) Unmarshal added in v0.87.0

func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error

type ResourceAttributesConfig added in v0.77.0

type ResourceAttributesConfig struct {
	DbSystem    ResourceAttributeConfig `mapstructure:"db.system"`
	SaphanaHost ResourceAttributeConfig `mapstructure:"saphana.host"`
}

ResourceAttributesConfig provides config for saphana 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) SetDbSystem added in v0.82.0

func (rb *ResourceBuilder) SetDbSystem(val string)

SetDbSystem sets provided value as "db.system" attribute.

func (*ResourceBuilder) SetSaphanaHost added in v0.82.0

func (rb *ResourceBuilder) SetSaphanaHost(val string)

SetSaphanaHost sets provided value as "saphana.host" attribute.

type ResourceMetricsOption added in v0.52.0

type ResourceMetricsOption func(pmetric.ResourceMetrics)

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.

Jump to

Keyboard shortcuts

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