metadata

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Type config.Type = "memcachedreceiver"

Type is the component type name.

Variables

A is an alias for Attributes.

View Source
var AttributeCommand = struct {
	Get   string
	Set   string
	Flush string
	Touch string
}{
	"get",
	"set",
	"flush",
	"touch",
}

AttributeCommand are the possible values that the attribute "command" can have.

View Source
var AttributeDirection = struct {
	Sent     string
	Received string
}{
	"sent",
	"received",
}

AttributeDirection are the possible values that the attribute "direction" can have.

View Source
var AttributeOperation = struct {
	Increment string
	Decrement string
	Get       string
}{
	"increment",
	"decrement",
	"get",
}

AttributeOperation are the possible values that the attribute "operation" can have.

View Source
var AttributeState = struct {
	System string
	User   string
}{
	"system",
	"user",
}

AttributeState are the possible values that the attribute "state" can have.

View Source
var AttributeType = struct {
	Hit  string
	Miss string
}{
	"hit",
	"miss",
}

AttributeType are the possible values that the attribute "type" can have.

View Source
var Attributes = struct {
	// Command (The type of command.)
	Command string
	// Direction (Direction of data flow.)
	Direction string
	// Operation (The type of operation.)
	Operation string
	// State (The type of CPU usage.)
	State string
	// Type (Result of cache request.)
	Type string
}{
	"command",
	"direction",
	"operation",
	"state",
	"type",
}

Attributes contains the possible metric attributes that can be used.

M contains a set of methods for each metric that help with manipulating those metrics. M is an alias for Metrics

View Source
var Metrics = &metricStruct{
	&metricImpl{
		"memcached.bytes",
		func(metric pdata.Metric) {
			metric.SetName("memcached.bytes")
			metric.SetDescription("Current number of bytes used by this server to store items.")
			metric.SetUnit("By")
			metric.SetDataType(pdata.MetricDataTypeGauge)
		},
	},
	&metricImpl{
		"memcached.commands",
		func(metric pdata.Metric) {
			metric.SetName("memcached.commands")
			metric.SetDescription("Commands executed.")
			metric.SetUnit("1")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.current_connections",
		func(metric pdata.Metric) {
			metric.SetName("memcached.current_connections")
			metric.SetDescription("The current number of open connections.")
			metric.SetUnit("connections")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(false)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.current_items",
		func(metric pdata.Metric) {
			metric.SetName("memcached.current_items")
			metric.SetDescription("Number of items currently stored in the cache.")
			metric.SetUnit("1")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(false)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.evictions",
		func(metric pdata.Metric) {
			metric.SetName("memcached.evictions")
			metric.SetDescription("Cache item evictions.")
			metric.SetUnit("1")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.network",
		func(metric pdata.Metric) {
			metric.SetName("memcached.network")
			metric.SetDescription("Bytes transferred over the network.")
			metric.SetUnit("by")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.operation_hit_ratio",
		func(metric pdata.Metric) {
			metric.SetName("memcached.operation_hit_ratio")
			metric.SetDescription("Hit ratio for operations, expressed as a percentage value between 0.0 and 100.0.")
			metric.SetUnit("%")
			metric.SetDataType(pdata.MetricDataTypeGauge)
		},
	},
	&metricImpl{
		"memcached.operations",
		func(metric pdata.Metric) {
			metric.SetName("memcached.operations")
			metric.SetDescription("Operation counts.")
			metric.SetUnit("1")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.rusage",
		func(metric pdata.Metric) {
			metric.SetName("memcached.rusage")
			metric.SetDescription("Accumulated user and system time.")
			metric.SetUnit("1")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.threads",
		func(metric pdata.Metric) {
			metric.SetName("memcached.threads")
			metric.SetDescription("Number of threads used by the memcached instance.")
			metric.SetUnit("1")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(false)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"memcached.total_connections",
		func(metric pdata.Metric) {
			metric.SetName("memcached.total_connections")
			metric.SetDescription("Total number of connections opened since the server started running.")
			metric.SetUnit("connections")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
}

Metrics contains a set of methods for each metric that help with manipulating those metrics.

Functions

This section is empty.

Types

type MetricIntf added in v0.20.0

type MetricIntf interface {
	Name() string
	New() pdata.Metric
	Init(metric pdata.Metric)
}

MetricIntf is an interface to generically interact with generated metric.

Jump to

Keyboard shortcuts

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