metadata

package
v0.37.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Type config.Type = "process"

Type is the component type name.

Variables

L contains the possible metric labels that can be used. L is an alias for Labels.

View Source
var LabelDirection = struct {
	Read  string
	Write string
}{
	"read",
	"write",
}

LabelDirection are the possible values that the label "direction" can have.

View Source
var LabelState = struct {
	System string
	User   string
	Wait   string
}{
	"system",
	"user",
	"wait",
}

LabelState are the possible values that the label "state" can have.

View Source
var Labels = struct {
	// Direction (Direction of flow of bytes (read or write).)
	Direction string
	// State (Breakdown of CPU usage by type.)
	State string
}{
	"direction",
	"state",
}

Labels contains the possible metric labels 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{
		"process.cpu.time",
		func(metric pdata.Metric) {
			metric.SetName("process.cpu.time")
			metric.SetDescription("Total CPU seconds broken down by different states.")
			metric.SetUnit("s")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"process.disk.io",
		func(metric pdata.Metric) {
			metric.SetName("process.disk.io")
			metric.SetDescription("Disk bytes transferred.")
			metric.SetUnit("By")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(true)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"process.memory.physical_usage",
		func(metric pdata.Metric) {
			metric.SetName("process.memory.physical_usage")
			metric.SetDescription("The amount of physical memory in use.")
			metric.SetUnit("By")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(false)
			metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative)
		},
	},
	&metricImpl{
		"process.memory.virtual_usage",
		func(metric pdata.Metric) {
			metric.SetName("process.memory.virtual_usage")
			metric.SetDescription("Virtual memory size.")
			metric.SetUnit("By")
			metric.SetDataType(pdata.MetricDataTypeSum)
			metric.Sum().SetIsMonotonic(false)
			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

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