Documentation ¶
Index ¶
- Constants
- Variables
- 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 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) 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 MetricsConfig
- type ResourceAttributeConfig
- type ResourceAttributesConfig
- type ResourceBuilder
- type ResourceMetricsOption
Constants ¶
const (
MetricsStability = component.StabilityLevelDevelopment
)
Variables ¶
var ( Type = component.MustNewType("saphana") ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver" )
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 ¶
This section is empty.
Types ¶
type AttributeActivePendingRequestState ¶
type AttributeActivePendingRequestState int
AttributeActivePendingRequestState specifies the 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 MetricBuilderOption ¶ added in v0.110.0
type MetricBuilderOption interface {
// contains filtered or unexported methods
}
MetricBuilderOption applies changes to default metrics builder.
func WithStartTime ¶
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 ¶
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.Settings, options ...MetricBuilderOption) *MetricsBuilder
func (*MetricsBuilder) Emit ¶
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 ¶
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) 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"` 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"` 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.
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 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.