metadata

package
v0.76.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Type      = "aerospikereceiver"
	Stability = component.StabilityLevelAlpha
)

Variables

View Source
var MapAttributeConnectionOp = map[string]AttributeConnectionOp{
	"close": AttributeConnectionOpClose,
	"open":  AttributeConnectionOpOpen,
}

MapAttributeConnectionOp is a helper map of string to AttributeConnectionOp attribute value.

MapAttributeConnectionType is a helper map of string to AttributeConnectionType attribute value.

View Source
var MapAttributeIndexType = map[string]AttributeIndexType{
	"primary":   AttributeIndexTypePrimary,
	"secondary": AttributeIndexTypeSecondary,
}

MapAttributeIndexType is a helper map of string to AttributeIndexType attribute value.

MapAttributeNamespaceComponent is a helper map of string to AttributeNamespaceComponent attribute value.

MapAttributeQueryResult is a helper map of string to AttributeQueryResult attribute value.

MapAttributeQueryType is a helper map of string to AttributeQueryType attribute value.

View Source
var MapAttributeScanResult = map[string]AttributeScanResult{
	"abort":    AttributeScanResultAbort,
	"complete": AttributeScanResultComplete,
	"error":    AttributeScanResultError,
}

MapAttributeScanResult is a helper map of string to AttributeScanResult attribute value.

View Source
var MapAttributeScanType = map[string]AttributeScanType{
	"aggregation":    AttributeScanTypeAggregation,
	"basic":          AttributeScanTypeBasic,
	"ops_background": AttributeScanTypeOpsBackground,
	"udf_background": AttributeScanTypeUdfBackground,
}

MapAttributeScanType is a helper map of string to AttributeScanType attribute value.

MapAttributeTransactionResult is a helper map of string to AttributeTransactionResult attribute value.

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

Functions

func WithStartTime

func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption

WithStartTime sets startTime on the metrics builder.

Types

type AttributeConnectionOp

type AttributeConnectionOp int

AttributeConnectionOp specifies the a value connection_op attribute.

const (
	AttributeConnectionOpClose AttributeConnectionOp
	AttributeConnectionOpOpen
)

func (AttributeConnectionOp) String

func (av AttributeConnectionOp) String() string

String returns the string representation of the AttributeConnectionOp.

type AttributeConnectionType

type AttributeConnectionType int

AttributeConnectionType specifies the a value connection_type attribute.

const (
	AttributeConnectionTypeClient AttributeConnectionType
	AttributeConnectionTypeFabric
	AttributeConnectionTypeHeartbeat
)

func (AttributeConnectionType) String

func (av AttributeConnectionType) String() string

String returns the string representation of the AttributeConnectionType.

type AttributeIndexType added in v0.59.0

type AttributeIndexType int

AttributeIndexType specifies the a value index_type attribute.

const (
	AttributeIndexTypePrimary AttributeIndexType
	AttributeIndexTypeSecondary
)

func (AttributeIndexType) String added in v0.59.0

func (av AttributeIndexType) String() string

String returns the string representation of the AttributeIndexType.

type AttributeNamespaceComponent

type AttributeNamespaceComponent int

AttributeNamespaceComponent specifies the a value namespace_component attribute.

const (
	AttributeNamespaceComponentData AttributeNamespaceComponent
	AttributeNamespaceComponentIndex
	AttributeNamespaceComponentSetIndex
	AttributeNamespaceComponentSecondaryIndex
)

func (AttributeNamespaceComponent) String

func (av AttributeNamespaceComponent) String() string

String returns the string representation of the AttributeNamespaceComponent.

type AttributeQueryResult added in v0.59.0

type AttributeQueryResult int

AttributeQueryResult specifies the a value query_result attribute.

const (
	AttributeQueryResultAbort AttributeQueryResult
	AttributeQueryResultComplete
	AttributeQueryResultError
	AttributeQueryResultTimeout
)

func (AttributeQueryResult) String added in v0.59.0

func (av AttributeQueryResult) String() string

String returns the string representation of the AttributeQueryResult.

type AttributeQueryType added in v0.59.0

type AttributeQueryType int

AttributeQueryType specifies the a value query_type attribute.

const (
	AttributeQueryTypeAggregation AttributeQueryType
	AttributeQueryTypeBasic
	AttributeQueryTypeShort
	AttributeQueryTypeLongBasic
	AttributeQueryTypeShortBasic
	AttributeQueryTypeOpsBackground
	AttributeQueryTypeUdfBackground
)

func (AttributeQueryType) String added in v0.59.0

func (av AttributeQueryType) String() string

String returns the string representation of the AttributeQueryType.

type AttributeScanResult

type AttributeScanResult int

AttributeScanResult specifies the a value scan_result attribute.

const (
	AttributeScanResultAbort AttributeScanResult
	AttributeScanResultComplete
	AttributeScanResultError
)

func (AttributeScanResult) String

func (av AttributeScanResult) String() string

String returns the string representation of the AttributeScanResult.

type AttributeScanType

type AttributeScanType int

AttributeScanType specifies the a value scan_type attribute.

const (
	AttributeScanTypeAggregation AttributeScanType
	AttributeScanTypeBasic
	AttributeScanTypeOpsBackground
	AttributeScanTypeUdfBackground
)

func (AttributeScanType) String

func (av AttributeScanType) String() string

String returns the string representation of the AttributeScanType.

type AttributeTransactionResult

type AttributeTransactionResult int

AttributeTransactionResult specifies the a value transaction_result attribute.

const (
	AttributeTransactionResultError AttributeTransactionResult
	AttributeTransactionResultFilteredOut
	AttributeTransactionResultNotFound
	AttributeTransactionResultSuccess
	AttributeTransactionResultTimeout
)

func (AttributeTransactionResult) String

func (av AttributeTransactionResult) String() string

String returns the string representation of the AttributeTransactionResult.

type AttributeTransactionType

type AttributeTransactionType int

AttributeTransactionType specifies the a value transaction_type attribute.

const (
	AttributeTransactionTypeDelete AttributeTransactionType
	AttributeTransactionTypeRead
	AttributeTransactionTypeUdf
	AttributeTransactionTypeWrite
)

func (AttributeTransactionType) String

func (av AttributeTransactionType) String() string

String returns the string representation of the AttributeTransactionType.

type MetricSettings

type MetricSettings struct {
	Enabled bool `mapstructure:"enabled"`
	// contains filtered or unexported fields
}

MetricSettings provides common settings for a particular metric.

func (*MetricSettings) Unmarshal added in v0.63.0

func (ms *MetricSettings) 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 settings.

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 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) RecordAerospikeNamespaceDiskAvailableDataPoint

func (mb *MetricsBuilder) RecordAerospikeNamespaceDiskAvailableDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNamespaceDiskAvailableDataPoint adds a data point to aerospike.namespace.disk.available metric.

func (*MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryCellsDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryCellsDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNamespaceGeojsonRegionQueryCellsDataPoint adds a data point to aerospike.namespace.geojson.region_query_cells metric.

func (*MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryFalsePositiveDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryFalsePositiveDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNamespaceGeojsonRegionQueryFalsePositiveDataPoint adds a data point to aerospike.namespace.geojson.region_query_false_positive metric.

func (*MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryPointsDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryPointsDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNamespaceGeojsonRegionQueryPointsDataPoint adds a data point to aerospike.namespace.geojson.region_query_points metric.

func (*MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryRequestsDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordAerospikeNamespaceGeojsonRegionQueryRequestsDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNamespaceGeojsonRegionQueryRequestsDataPoint adds a data point to aerospike.namespace.geojson.region_query_requests metric.

func (*MetricsBuilder) RecordAerospikeNamespaceMemoryFreeDataPoint

func (mb *MetricsBuilder) RecordAerospikeNamespaceMemoryFreeDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNamespaceMemoryFreeDataPoint adds a data point to aerospike.namespace.memory.free metric.

func (*MetricsBuilder) RecordAerospikeNamespaceMemoryUsageDataPoint

func (mb *MetricsBuilder) RecordAerospikeNamespaceMemoryUsageDataPoint(ts pcommon.Timestamp, inputVal string, namespaceComponentAttributeValue AttributeNamespaceComponent) error

RecordAerospikeNamespaceMemoryUsageDataPoint adds a data point to aerospike.namespace.memory.usage metric.

func (*MetricsBuilder) RecordAerospikeNamespaceQueryCountDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordAerospikeNamespaceQueryCountDataPoint(ts pcommon.Timestamp, inputVal string, queryTypeAttributeValue AttributeQueryType, indexTypeAttributeValue AttributeIndexType, queryResultAttributeValue AttributeQueryResult) error

RecordAerospikeNamespaceQueryCountDataPoint adds a data point to aerospike.namespace.query.count metric.

func (*MetricsBuilder) RecordAerospikeNamespaceScanCountDataPoint

func (mb *MetricsBuilder) RecordAerospikeNamespaceScanCountDataPoint(ts pcommon.Timestamp, inputVal string, scanTypeAttributeValue AttributeScanType, scanResultAttributeValue AttributeScanResult) error

RecordAerospikeNamespaceScanCountDataPoint adds a data point to aerospike.namespace.scan.count metric.

func (*MetricsBuilder) RecordAerospikeNamespaceTransactionCountDataPoint added in v0.55.0

func (mb *MetricsBuilder) RecordAerospikeNamespaceTransactionCountDataPoint(ts pcommon.Timestamp, inputVal string, transactionTypeAttributeValue AttributeTransactionType, transactionResultAttributeValue AttributeTransactionResult) error

RecordAerospikeNamespaceTransactionCountDataPoint adds a data point to aerospike.namespace.transaction.count metric.

func (*MetricsBuilder) RecordAerospikeNodeConnectionCountDataPoint

func (mb *MetricsBuilder) RecordAerospikeNodeConnectionCountDataPoint(ts pcommon.Timestamp, inputVal string, connectionTypeAttributeValue AttributeConnectionType, connectionOpAttributeValue AttributeConnectionOp) error

RecordAerospikeNodeConnectionCountDataPoint adds a data point to aerospike.node.connection.count metric.

func (*MetricsBuilder) RecordAerospikeNodeConnectionOpenDataPoint

func (mb *MetricsBuilder) RecordAerospikeNodeConnectionOpenDataPoint(ts pcommon.Timestamp, inputVal string, connectionTypeAttributeValue AttributeConnectionType) error

RecordAerospikeNodeConnectionOpenDataPoint adds a data point to aerospike.node.connection.open metric.

func (*MetricsBuilder) RecordAerospikeNodeMemoryFreeDataPoint

func (mb *MetricsBuilder) RecordAerospikeNodeMemoryFreeDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNodeMemoryFreeDataPoint adds a data point to aerospike.node.memory.free metric.

func (*MetricsBuilder) RecordAerospikeNodeQueryTrackedDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordAerospikeNodeQueryTrackedDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordAerospikeNodeQueryTrackedDataPoint adds a data point to aerospike.node.query.tracked 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 {
	AerospikeNamespaceDiskAvailable                   MetricSettings `mapstructure:"aerospike.namespace.disk.available"`
	AerospikeNamespaceGeojsonRegionQueryCells         MetricSettings `mapstructure:"aerospike.namespace.geojson.region_query_cells"`
	AerospikeNamespaceGeojsonRegionQueryFalsePositive MetricSettings `mapstructure:"aerospike.namespace.geojson.region_query_false_positive"`
	AerospikeNamespaceGeojsonRegionQueryPoints        MetricSettings `mapstructure:"aerospike.namespace.geojson.region_query_points"`
	AerospikeNamespaceGeojsonRegionQueryRequests      MetricSettings `mapstructure:"aerospike.namespace.geojson.region_query_requests"`
	AerospikeNamespaceMemoryFree                      MetricSettings `mapstructure:"aerospike.namespace.memory.free"`
	AerospikeNamespaceMemoryUsage                     MetricSettings `mapstructure:"aerospike.namespace.memory.usage"`
	AerospikeNamespaceQueryCount                      MetricSettings `mapstructure:"aerospike.namespace.query.count"`
	AerospikeNamespaceScanCount                       MetricSettings `mapstructure:"aerospike.namespace.scan.count"`
	AerospikeNamespaceTransactionCount                MetricSettings `mapstructure:"aerospike.namespace.transaction.count"`
	AerospikeNodeConnectionCount                      MetricSettings `mapstructure:"aerospike.node.connection.count"`
	AerospikeNodeConnectionOpen                       MetricSettings `mapstructure:"aerospike.node.connection.open"`
	AerospikeNodeMemoryFree                           MetricSettings `mapstructure:"aerospike.node.memory.free"`
	AerospikeNodeQueryTracked                         MetricSettings `mapstructure:"aerospike.node.query.tracked"`
}

MetricsSettings provides settings for aerospikereceiver 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 {
	AerospikeNamespace ResourceAttributeSettings `mapstructure:"aerospike.namespace"`
	AerospikeNodeName  ResourceAttributeSettings `mapstructure:"aerospike.node.name"`
}

ResourceAttributesSettings provides settings for aerospikereceiver metrics.

func DefaultResourceAttributesSettings added in v0.70.0

func DefaultResourceAttributesSettings() ResourceAttributesSettings

type ResourceMetricsOption

type ResourceMetricsOption func(ResourceAttributesSettings, pmetric.ResourceMetrics)

ResourceMetricsOption applies changes to provided resource metrics.

func WithAerospikeNamespace

func WithAerospikeNamespace(val string) ResourceMetricsOption

WithAerospikeNamespace sets provided value as "aerospike.namespace" attribute for current resource.

func WithAerospikeNodeName

func WithAerospikeNodeName(val string) ResourceMetricsOption

WithAerospikeNodeName sets provided value as "aerospike.node.name" attribute for current resource.

func WithStartTimeOverride

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