metadata

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsStability = component.StabilityLevelAlpha
)

Variables

View Source
var (
	Type      = component.MustNewType("aerospike")
	ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver"
)
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

This section is empty.

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

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

MetricsBuilderConfig is a configuration for aerospike metrics builder.

func DefaultMetricsBuilderConfig added in v0.73.0

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig added in v0.77.0

type MetricsConfig struct {
	AerospikeNamespaceDiskAvailable                   MetricConfig `mapstructure:"aerospike.namespace.disk.available"`
	AerospikeNamespaceGeojsonRegionQueryCells         MetricConfig `mapstructure:"aerospike.namespace.geojson.region_query_cells"`
	AerospikeNamespaceGeojsonRegionQueryFalsePositive MetricConfig `mapstructure:"aerospike.namespace.geojson.region_query_false_positive"`
	AerospikeNamespaceGeojsonRegionQueryPoints        MetricConfig `mapstructure:"aerospike.namespace.geojson.region_query_points"`
	AerospikeNamespaceGeojsonRegionQueryRequests      MetricConfig `mapstructure:"aerospike.namespace.geojson.region_query_requests"`
	AerospikeNamespaceMemoryFree                      MetricConfig `mapstructure:"aerospike.namespace.memory.free"`
	AerospikeNamespaceMemoryUsage                     MetricConfig `mapstructure:"aerospike.namespace.memory.usage"`
	AerospikeNamespaceQueryCount                      MetricConfig `mapstructure:"aerospike.namespace.query.count"`
	AerospikeNamespaceScanCount                       MetricConfig `mapstructure:"aerospike.namespace.scan.count"`
	AerospikeNamespaceTransactionCount                MetricConfig `mapstructure:"aerospike.namespace.transaction.count"`
	AerospikeNodeConnectionCount                      MetricConfig `mapstructure:"aerospike.node.connection.count"`
	AerospikeNodeConnectionOpen                       MetricConfig `mapstructure:"aerospike.node.connection.open"`
	AerospikeNodeMemoryFree                           MetricConfig `mapstructure:"aerospike.node.memory.free"`
	AerospikeNodeQueryTracked                         MetricConfig `mapstructure:"aerospike.node.query.tracked"`
}

MetricsConfig provides config for aerospike 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 {
	AerospikeNamespace ResourceAttributeConfig `mapstructure:"aerospike.namespace"`
	AerospikeNodeName  ResourceAttributeConfig `mapstructure:"aerospike.node.name"`
}

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

func (rb *ResourceBuilder) SetAerospikeNamespace(val string)

SetAerospikeNamespace sets provided value as "aerospike.namespace" attribute.

func (*ResourceBuilder) SetAerospikeNodeName added in v0.82.0

func (rb *ResourceBuilder) SetAerospikeNodeName(val string)

SetAerospikeNodeName sets provided value as "aerospike.node.name" attribute.

type ResourceMetricsOption

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

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