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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsStability = component.StabilityLevelAlpha
)

Variables

View Source
var (
	Type      = component.MustNewType("vcenter")
	ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver"
)

MapAttributeCPUReservationType is a helper map of string to AttributeCPUReservationType attribute value.

View Source
var MapAttributeDiskDirection = map[string]AttributeDiskDirection{
	"read":  AttributeDiskDirectionRead,
	"write": AttributeDiskDirectionWrite,
}

MapAttributeDiskDirection is a helper map of string to AttributeDiskDirection attribute value.

View Source
var MapAttributeDiskState = map[string]AttributeDiskState{
	"available": AttributeDiskStateAvailable,
	"used":      AttributeDiskStateUsed,
}

MapAttributeDiskState is a helper map of string to AttributeDiskState attribute value.

View Source
var MapAttributeDiskType = map[string]AttributeDiskType{
	"virtual":  AttributeDiskTypeVirtual,
	"physical": AttributeDiskTypePhysical,
}

MapAttributeDiskType is a helper map of string to AttributeDiskType attribute value.

MapAttributeEntityStatus is a helper map of string to AttributeEntityStatus attribute value.

MapAttributeHostPowerState is a helper map of string to AttributeHostPowerState attribute value.

View Source
var MapAttributeMemoryGrantedType = map[string]AttributeMemoryGrantedType{
	"private": AttributeMemoryGrantedTypePrivate,
	"shared":  AttributeMemoryGrantedTypeShared,
}

MapAttributeMemoryGrantedType is a helper map of string to AttributeMemoryGrantedType attribute value.

MapAttributeMemoryUsageType is a helper map of string to AttributeMemoryUsageType attribute value.

View Source
var MapAttributeThroughputDirection = map[string]AttributeThroughputDirection{
	"transmitted": AttributeThroughputDirectionTransmitted,
	"received":    AttributeThroughputDirectionReceived,
}

MapAttributeThroughputDirection is a helper map of string to AttributeThroughputDirection attribute value.

MapAttributeVMCountPowerState is a helper map of string to AttributeVMCountPowerState attribute value.

View Source
var MapAttributeVsanLatencyType = map[string]AttributeVsanLatencyType{
	"read":  AttributeVsanLatencyTypeRead,
	"write": AttributeVsanLatencyTypeWrite,
}

MapAttributeVsanLatencyType is a helper map of string to AttributeVsanLatencyType attribute value.

MapAttributeVsanOperationType is a helper map of string to AttributeVsanOperationType attribute value.

MapAttributeVsanThroughputDirection is a helper map of string to AttributeVsanThroughputDirection attribute value.

Functions

This section is empty.

Types

type AttributeCPUReservationType added in v0.104.0

type AttributeCPUReservationType int

AttributeCPUReservationType specifies the a value cpu_reservation_type attribute.

const (
	AttributeCPUReservationTypeTotal AttributeCPUReservationType
	AttributeCPUReservationTypeUsed
)

func (AttributeCPUReservationType) String added in v0.104.0

func (av AttributeCPUReservationType) String() string

String returns the string representation of the AttributeCPUReservationType.

type AttributeDiskDirection

type AttributeDiskDirection int

AttributeDiskDirection specifies the a value disk_direction attribute.

const (
	AttributeDiskDirectionRead AttributeDiskDirection
	AttributeDiskDirectionWrite
)

func (AttributeDiskDirection) String

func (av AttributeDiskDirection) String() string

String returns the string representation of the AttributeDiskDirection.

type AttributeDiskState

type AttributeDiskState int

AttributeDiskState specifies the a value disk_state attribute.

const (
	AttributeDiskStateAvailable AttributeDiskState
	AttributeDiskStateUsed
)

func (AttributeDiskState) String

func (av AttributeDiskState) String() string

String returns the string representation of the AttributeDiskState.

type AttributeDiskType

type AttributeDiskType int

AttributeDiskType specifies the a value disk_type attribute.

const (
	AttributeDiskTypeVirtual AttributeDiskType
	AttributeDiskTypePhysical
)

func (AttributeDiskType) String

func (av AttributeDiskType) String() string

String returns the string representation of the AttributeDiskType.

type AttributeEntityStatus added in v0.105.0

type AttributeEntityStatus int

AttributeEntityStatus specifies the a value entity_status attribute.

const (
	AttributeEntityStatusRed AttributeEntityStatus
	AttributeEntityStatusYellow
	AttributeEntityStatusGreen
	AttributeEntityStatusGray
)

func (AttributeEntityStatus) String added in v0.105.0

func (av AttributeEntityStatus) String() string

String returns the string representation of the AttributeEntityStatus.

type AttributeHostPowerState added in v0.105.0

type AttributeHostPowerState int

AttributeHostPowerState specifies the a value host_power_state attribute.

const (
	AttributeHostPowerStateOn AttributeHostPowerState
	AttributeHostPowerStateOff
	AttributeHostPowerStateStandby
	AttributeHostPowerStateUnknown
)

func (AttributeHostPowerState) String added in v0.105.0

func (av AttributeHostPowerState) String() string

String returns the string representation of the AttributeHostPowerState.

type AttributeMemoryGrantedType added in v0.105.0

type AttributeMemoryGrantedType int

AttributeMemoryGrantedType specifies the a value memory_granted_type attribute.

const (
	AttributeMemoryGrantedTypePrivate AttributeMemoryGrantedType
	AttributeMemoryGrantedTypeShared
)

func (AttributeMemoryGrantedType) String added in v0.105.0

func (av AttributeMemoryGrantedType) String() string

String returns the string representation of the AttributeMemoryGrantedType.

type AttributeMemoryUsageType added in v0.105.0

type AttributeMemoryUsageType int

AttributeMemoryUsageType specifies the a value memory_usage_type attribute.

const (
	AttributeMemoryUsageTypeGuest AttributeMemoryUsageType
	AttributeMemoryUsageTypeHost
	AttributeMemoryUsageTypeOverhead
)

func (AttributeMemoryUsageType) String added in v0.105.0

func (av AttributeMemoryUsageType) String() string

String returns the string representation of the AttributeMemoryUsageType.

type AttributeThroughputDirection

type AttributeThroughputDirection int

AttributeThroughputDirection specifies the a value throughput_direction attribute.

const (
	AttributeThroughputDirectionTransmitted AttributeThroughputDirection
	AttributeThroughputDirectionReceived
)

func (AttributeThroughputDirection) String

String returns the string representation of the AttributeThroughputDirection.

type AttributeVMCountPowerState

type AttributeVMCountPowerState int

AttributeVMCountPowerState specifies the a value vm_count_power_state attribute.

const (
	AttributeVMCountPowerStateOn AttributeVMCountPowerState
	AttributeVMCountPowerStateOff
	AttributeVMCountPowerStateSuspended
	AttributeVMCountPowerStateUnknown
)

func (AttributeVMCountPowerState) String

func (av AttributeVMCountPowerState) String() string

String returns the string representation of the AttributeVMCountPowerState.

type AttributeVsanLatencyType added in v0.106.0

type AttributeVsanLatencyType int

AttributeVsanLatencyType specifies the a value vsan_latency_type attribute.

const (
	AttributeVsanLatencyTypeRead AttributeVsanLatencyType
	AttributeVsanLatencyTypeWrite
)

func (AttributeVsanLatencyType) String added in v0.106.0

func (av AttributeVsanLatencyType) String() string

String returns the string representation of the AttributeVsanLatencyType.

type AttributeVsanOperationType added in v0.106.0

type AttributeVsanOperationType int

AttributeVsanOperationType specifies the a value vsan_operation_type attribute.

const (
	AttributeVsanOperationTypeRead AttributeVsanOperationType
	AttributeVsanOperationTypeWrite
	AttributeVsanOperationTypeUnmap
)

func (AttributeVsanOperationType) String added in v0.106.0

func (av AttributeVsanOperationType) String() string

String returns the string representation of the AttributeVsanOperationType.

type AttributeVsanThroughputDirection added in v0.106.0

type AttributeVsanThroughputDirection int

AttributeVsanThroughputDirection specifies the a value vsan_throughput_direction attribute.

const (
	AttributeVsanThroughputDirectionRead AttributeVsanThroughputDirection
	AttributeVsanThroughputDirectionWrite
)

func (AttributeVsanThroughputDirection) String added in v0.106.0

String returns the string representation of the AttributeVsanThroughputDirection.

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

func (mb *MetricsBuilder) RecordVcenterClusterCPUEffectiveDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterClusterCPUEffectiveDataPoint adds a data point to vcenter.cluster.cpu.effective metric.

func (*MetricsBuilder) RecordVcenterClusterCPULimitDataPoint

func (mb *MetricsBuilder) RecordVcenterClusterCPULimitDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterClusterCPULimitDataPoint adds a data point to vcenter.cluster.cpu.limit metric.

func (*MetricsBuilder) RecordVcenterClusterHostCountDataPoint

func (mb *MetricsBuilder) RecordVcenterClusterHostCountDataPoint(ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue bool)

RecordVcenterClusterHostCountDataPoint adds a data point to vcenter.cluster.host.count metric.

func (*MetricsBuilder) RecordVcenterClusterMemoryEffectiveDataPoint

func (mb *MetricsBuilder) RecordVcenterClusterMemoryEffectiveDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterClusterMemoryEffectiveDataPoint adds a data point to vcenter.cluster.memory.effective metric.

func (*MetricsBuilder) RecordVcenterClusterMemoryLimitDataPoint

func (mb *MetricsBuilder) RecordVcenterClusterMemoryLimitDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterClusterMemoryLimitDataPoint adds a data point to vcenter.cluster.memory.limit metric.

func (*MetricsBuilder) RecordVcenterClusterVMCountDataPoint

func (mb *MetricsBuilder) RecordVcenterClusterVMCountDataPoint(ts pcommon.Timestamp, val int64, vmCountPowerStateAttributeValue AttributeVMCountPowerState)

RecordVcenterClusterVMCountDataPoint adds a data point to vcenter.cluster.vm.count metric.

func (*MetricsBuilder) RecordVcenterClusterVMTemplateCountDataPoint added in v0.100.0

func (mb *MetricsBuilder) RecordVcenterClusterVMTemplateCountDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterClusterVMTemplateCountDataPoint adds a data point to vcenter.cluster.vm_template.count metric.

func (*MetricsBuilder) RecordVcenterClusterVsanCongestionsDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterClusterVsanCongestionsDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterClusterVsanCongestionsDataPoint adds a data point to vcenter.cluster.vsan.congestions metric.

func (*MetricsBuilder) RecordVcenterClusterVsanLatencyAvgDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterClusterVsanLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, vsanLatencyTypeAttributeValue AttributeVsanLatencyType)

RecordVcenterClusterVsanLatencyAvgDataPoint adds a data point to vcenter.cluster.vsan.latency.avg metric.

func (*MetricsBuilder) RecordVcenterClusterVsanOperationsDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterClusterVsanOperationsDataPoint(ts pcommon.Timestamp, val int64, vsanOperationTypeAttributeValue AttributeVsanOperationType)

RecordVcenterClusterVsanOperationsDataPoint adds a data point to vcenter.cluster.vsan.operations metric.

func (*MetricsBuilder) RecordVcenterClusterVsanThroughputDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterClusterVsanThroughputDataPoint(ts pcommon.Timestamp, val float64, vsanThroughputDirectionAttributeValue AttributeVsanThroughputDirection)

RecordVcenterClusterVsanThroughputDataPoint adds a data point to vcenter.cluster.vsan.throughput metric.

func (*MetricsBuilder) RecordVcenterDatacenterCPULimitDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterCPULimitDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterDatacenterCPULimitDataPoint adds a data point to vcenter.datacenter.cpu.limit metric.

func (*MetricsBuilder) RecordVcenterDatacenterClusterCountDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterClusterCountDataPoint(ts pcommon.Timestamp, val int64, entityStatusAttributeValue AttributeEntityStatus)

RecordVcenterDatacenterClusterCountDataPoint adds a data point to vcenter.datacenter.cluster.count metric.

func (*MetricsBuilder) RecordVcenterDatacenterDatastoreCountDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterDatastoreCountDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterDatacenterDatastoreCountDataPoint adds a data point to vcenter.datacenter.datastore.count metric.

func (*MetricsBuilder) RecordVcenterDatacenterDiskSpaceDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterDiskSpaceDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)

RecordVcenterDatacenterDiskSpaceDataPoint adds a data point to vcenter.datacenter.disk.space metric.

func (*MetricsBuilder) RecordVcenterDatacenterHostCountDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterHostCountDataPoint(ts pcommon.Timestamp, val int64, entityStatusAttributeValue AttributeEntityStatus, hostPowerStateAttributeValue AttributeHostPowerState)

RecordVcenterDatacenterHostCountDataPoint adds a data point to vcenter.datacenter.host.count metric.

func (*MetricsBuilder) RecordVcenterDatacenterMemoryLimitDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterMemoryLimitDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterDatacenterMemoryLimitDataPoint adds a data point to vcenter.datacenter.memory.limit metric.

func (*MetricsBuilder) RecordVcenterDatacenterVMCountDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterDatacenterVMCountDataPoint(ts pcommon.Timestamp, val int64, entityStatusAttributeValue AttributeEntityStatus, vmCountPowerStateAttributeValue AttributeVMCountPowerState)

RecordVcenterDatacenterVMCountDataPoint adds a data point to vcenter.datacenter.vm.count metric.

func (*MetricsBuilder) RecordVcenterDatastoreDiskUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterDatastoreDiskUsageDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)

RecordVcenterDatastoreDiskUsageDataPoint adds a data point to vcenter.datastore.disk.usage metric.

func (*MetricsBuilder) RecordVcenterDatastoreDiskUtilizationDataPoint

func (mb *MetricsBuilder) RecordVcenterDatastoreDiskUtilizationDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterDatastoreDiskUtilizationDataPoint adds a data point to vcenter.datastore.disk.utilization metric.

func (*MetricsBuilder) RecordVcenterHostCPUCapacityDataPoint added in v0.104.0

func (mb *MetricsBuilder) RecordVcenterHostCPUCapacityDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterHostCPUCapacityDataPoint adds a data point to vcenter.host.cpu.capacity metric.

func (*MetricsBuilder) RecordVcenterHostCPUReservedDataPoint added in v0.104.0

func (mb *MetricsBuilder) RecordVcenterHostCPUReservedDataPoint(ts pcommon.Timestamp, val int64, cpuReservationTypeAttributeValue AttributeCPUReservationType)

RecordVcenterHostCPUReservedDataPoint adds a data point to vcenter.host.cpu.reserved metric.

func (*MetricsBuilder) RecordVcenterHostCPUUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterHostCPUUsageDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterHostCPUUsageDataPoint adds a data point to vcenter.host.cpu.usage metric.

func (*MetricsBuilder) RecordVcenterHostCPUUtilizationDataPoint

func (mb *MetricsBuilder) RecordVcenterHostCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterHostCPUUtilizationDataPoint adds a data point to vcenter.host.cpu.utilization metric.

func (*MetricsBuilder) RecordVcenterHostDiskLatencyAvgDataPoint

func (mb *MetricsBuilder) RecordVcenterHostDiskLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection, objectNameAttributeValue string)

RecordVcenterHostDiskLatencyAvgDataPoint adds a data point to vcenter.host.disk.latency.avg metric.

func (*MetricsBuilder) RecordVcenterHostDiskLatencyMaxDataPoint

func (mb *MetricsBuilder) RecordVcenterHostDiskLatencyMaxDataPoint(ts pcommon.Timestamp, val int64, objectNameAttributeValue string)

RecordVcenterHostDiskLatencyMaxDataPoint adds a data point to vcenter.host.disk.latency.max metric.

func (*MetricsBuilder) RecordVcenterHostDiskThroughputDataPoint

func (mb *MetricsBuilder) RecordVcenterHostDiskThroughputDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection, objectNameAttributeValue string)

RecordVcenterHostDiskThroughputDataPoint adds a data point to vcenter.host.disk.throughput metric.

func (*MetricsBuilder) RecordVcenterHostMemoryUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterHostMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterHostMemoryUsageDataPoint adds a data point to vcenter.host.memory.usage metric.

func (*MetricsBuilder) RecordVcenterHostMemoryUtilizationDataPoint

func (mb *MetricsBuilder) RecordVcenterHostMemoryUtilizationDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterHostMemoryUtilizationDataPoint adds a data point to vcenter.host.memory.utilization metric.

func (*MetricsBuilder) RecordVcenterHostNetworkPacketDropRateDataPoint added in v0.104.0

func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketDropRateDataPoint(ts pcommon.Timestamp, val float64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterHostNetworkPacketDropRateDataPoint adds a data point to vcenter.host.network.packet.drop.rate metric.

func (*MetricsBuilder) RecordVcenterHostNetworkPacketErrorRateDataPoint added in v0.101.0

func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketErrorRateDataPoint(ts pcommon.Timestamp, val float64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterHostNetworkPacketErrorRateDataPoint adds a data point to vcenter.host.network.packet.error.rate metric.

func (*MetricsBuilder) RecordVcenterHostNetworkPacketRateDataPoint added in v0.101.0

func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketRateDataPoint(ts pcommon.Timestamp, val float64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterHostNetworkPacketRateDataPoint adds a data point to vcenter.host.network.packet.rate metric.

func (*MetricsBuilder) RecordVcenterHostNetworkThroughputDataPoint

func (mb *MetricsBuilder) RecordVcenterHostNetworkThroughputDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterHostNetworkThroughputDataPoint adds a data point to vcenter.host.network.throughput metric.

func (*MetricsBuilder) RecordVcenterHostNetworkUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterHostNetworkUsageDataPoint(ts pcommon.Timestamp, val int64, objectNameAttributeValue string)

RecordVcenterHostNetworkUsageDataPoint adds a data point to vcenter.host.network.usage metric.

func (*MetricsBuilder) RecordVcenterHostVsanCacheHitRateDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterHostVsanCacheHitRateDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterHostVsanCacheHitRateDataPoint adds a data point to vcenter.host.vsan.cache.hit_rate metric.

func (*MetricsBuilder) RecordVcenterHostVsanCongestionsDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterHostVsanCongestionsDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterHostVsanCongestionsDataPoint adds a data point to vcenter.host.vsan.congestions metric.

func (*MetricsBuilder) RecordVcenterHostVsanLatencyAvgDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterHostVsanLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, vsanLatencyTypeAttributeValue AttributeVsanLatencyType)

RecordVcenterHostVsanLatencyAvgDataPoint adds a data point to vcenter.host.vsan.latency.avg metric.

func (*MetricsBuilder) RecordVcenterHostVsanOperationsDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterHostVsanOperationsDataPoint(ts pcommon.Timestamp, val int64, vsanOperationTypeAttributeValue AttributeVsanOperationType)

RecordVcenterHostVsanOperationsDataPoint adds a data point to vcenter.host.vsan.operations metric.

func (*MetricsBuilder) RecordVcenterHostVsanThroughputDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterHostVsanThroughputDataPoint(ts pcommon.Timestamp, val float64, vsanThroughputDirectionAttributeValue AttributeVsanThroughputDirection)

RecordVcenterHostVsanThroughputDataPoint adds a data point to vcenter.host.vsan.throughput metric.

func (*MetricsBuilder) RecordVcenterResourcePoolCPUSharesDataPoint

func (mb *MetricsBuilder) RecordVcenterResourcePoolCPUSharesDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterResourcePoolCPUSharesDataPoint adds a data point to vcenter.resource_pool.cpu.shares metric.

func (*MetricsBuilder) RecordVcenterResourcePoolCPUUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterResourcePoolCPUUsageDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterResourcePoolCPUUsageDataPoint adds a data point to vcenter.resource_pool.cpu.usage metric.

func (*MetricsBuilder) RecordVcenterResourcePoolMemoryBalloonedDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterResourcePoolMemoryBalloonedDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterResourcePoolMemoryBalloonedDataPoint adds a data point to vcenter.resource_pool.memory.ballooned metric.

func (*MetricsBuilder) RecordVcenterResourcePoolMemoryGrantedDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterResourcePoolMemoryGrantedDataPoint(ts pcommon.Timestamp, val int64, memoryGrantedTypeAttributeValue AttributeMemoryGrantedType)

RecordVcenterResourcePoolMemoryGrantedDataPoint adds a data point to vcenter.resource_pool.memory.granted metric.

func (*MetricsBuilder) RecordVcenterResourcePoolMemorySharesDataPoint

func (mb *MetricsBuilder) RecordVcenterResourcePoolMemorySharesDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterResourcePoolMemorySharesDataPoint adds a data point to vcenter.resource_pool.memory.shares metric.

func (*MetricsBuilder) RecordVcenterResourcePoolMemorySwappedDataPoint added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterResourcePoolMemorySwappedDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterResourcePoolMemorySwappedDataPoint adds a data point to vcenter.resource_pool.memory.swapped metric.

func (*MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPoint(ts pcommon.Timestamp, val int64, memoryUsageTypeAttributeValue AttributeMemoryUsageType)

RecordVcenterResourcePoolMemoryUsageDataPoint adds a data point to vcenter.resource_pool.memory.usage metric.

func (*MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPointWithoutTypeAttribute added in v0.105.0

func (mb *MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPointWithoutTypeAttribute(ts pcommon.Timestamp, val int64)

func (*MetricsBuilder) RecordVcenterVMCPUReadinessDataPoint added in v0.104.0

func (mb *MetricsBuilder) RecordVcenterVMCPUReadinessDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterVMCPUReadinessDataPoint adds a data point to vcenter.vm.cpu.readiness metric.

func (*MetricsBuilder) RecordVcenterVMCPUUsageDataPoint added in v0.76.1

func (mb *MetricsBuilder) RecordVcenterVMCPUUsageDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterVMCPUUsageDataPoint adds a data point to vcenter.vm.cpu.usage metric.

func (*MetricsBuilder) RecordVcenterVMCPUUtilizationDataPoint

func (mb *MetricsBuilder) RecordVcenterVMCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterVMCPUUtilizationDataPoint adds a data point to vcenter.vm.cpu.utilization metric.

func (*MetricsBuilder) RecordVcenterVMDiskLatencyAvgDataPoint

func (mb *MetricsBuilder) RecordVcenterVMDiskLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection, diskTypeAttributeValue AttributeDiskType, objectNameAttributeValue string)

RecordVcenterVMDiskLatencyAvgDataPoint adds a data point to vcenter.vm.disk.latency.avg metric.

func (*MetricsBuilder) RecordVcenterVMDiskLatencyMaxDataPoint

func (mb *MetricsBuilder) RecordVcenterVMDiskLatencyMaxDataPoint(ts pcommon.Timestamp, val int64, objectNameAttributeValue string)

RecordVcenterVMDiskLatencyMaxDataPoint adds a data point to vcenter.vm.disk.latency.max metric.

func (*MetricsBuilder) RecordVcenterVMDiskThroughputDataPoint

func (mb *MetricsBuilder) RecordVcenterVMDiskThroughputDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection, objectNameAttributeValue string)

RecordVcenterVMDiskThroughputDataPoint adds a data point to vcenter.vm.disk.throughput metric.

func (*MetricsBuilder) RecordVcenterVMDiskUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterVMDiskUsageDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)

RecordVcenterVMDiskUsageDataPoint adds a data point to vcenter.vm.disk.usage metric.

func (*MetricsBuilder) RecordVcenterVMDiskUtilizationDataPoint

func (mb *MetricsBuilder) RecordVcenterVMDiskUtilizationDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterVMDiskUtilizationDataPoint adds a data point to vcenter.vm.disk.utilization metric.

func (*MetricsBuilder) RecordVcenterVMMemoryBalloonedDataPoint

func (mb *MetricsBuilder) RecordVcenterVMMemoryBalloonedDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterVMMemoryBalloonedDataPoint adds a data point to vcenter.vm.memory.ballooned metric.

func (*MetricsBuilder) RecordVcenterVMMemorySwappedDataPoint added in v0.67.0

func (mb *MetricsBuilder) RecordVcenterVMMemorySwappedDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterVMMemorySwappedDataPoint adds a data point to vcenter.vm.memory.swapped metric.

func (*MetricsBuilder) RecordVcenterVMMemorySwappedSsdDataPoint added in v0.67.0

func (mb *MetricsBuilder) RecordVcenterVMMemorySwappedSsdDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterVMMemorySwappedSsdDataPoint adds a data point to vcenter.vm.memory.swapped_ssd metric.

func (*MetricsBuilder) RecordVcenterVMMemoryUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterVMMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)

RecordVcenterVMMemoryUsageDataPoint adds a data point to vcenter.vm.memory.usage metric.

func (*MetricsBuilder) RecordVcenterVMMemoryUtilizationDataPoint added in v0.79.0

func (mb *MetricsBuilder) RecordVcenterVMMemoryUtilizationDataPoint(ts pcommon.Timestamp, val float64)

RecordVcenterVMMemoryUtilizationDataPoint adds a data point to vcenter.vm.memory.utilization metric.

func (*MetricsBuilder) RecordVcenterVMNetworkPacketDropRateDataPoint added in v0.101.0

func (mb *MetricsBuilder) RecordVcenterVMNetworkPacketDropRateDataPoint(ts pcommon.Timestamp, val float64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterVMNetworkPacketDropRateDataPoint adds a data point to vcenter.vm.network.packet.drop.rate metric.

func (*MetricsBuilder) RecordVcenterVMNetworkPacketRateDataPoint added in v0.101.0

func (mb *MetricsBuilder) RecordVcenterVMNetworkPacketRateDataPoint(ts pcommon.Timestamp, val float64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterVMNetworkPacketRateDataPoint adds a data point to vcenter.vm.network.packet.rate metric.

func (*MetricsBuilder) RecordVcenterVMNetworkThroughputDataPoint

func (mb *MetricsBuilder) RecordVcenterVMNetworkThroughputDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection, objectNameAttributeValue string)

RecordVcenterVMNetworkThroughputDataPoint adds a data point to vcenter.vm.network.throughput metric.

func (*MetricsBuilder) RecordVcenterVMNetworkUsageDataPoint

func (mb *MetricsBuilder) RecordVcenterVMNetworkUsageDataPoint(ts pcommon.Timestamp, val int64, objectNameAttributeValue string)

RecordVcenterVMNetworkUsageDataPoint adds a data point to vcenter.vm.network.usage metric.

func (*MetricsBuilder) RecordVcenterVMVsanLatencyAvgDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterVMVsanLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, vsanLatencyTypeAttributeValue AttributeVsanLatencyType)

RecordVcenterVMVsanLatencyAvgDataPoint adds a data point to vcenter.vm.vsan.latency.avg metric.

func (*MetricsBuilder) RecordVcenterVMVsanOperationsDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterVMVsanOperationsDataPoint(ts pcommon.Timestamp, val int64, vsanOperationTypeAttributeValue AttributeVsanOperationType)

RecordVcenterVMVsanOperationsDataPoint adds a data point to vcenter.vm.vsan.operations metric.

func (*MetricsBuilder) RecordVcenterVMVsanThroughputDataPoint added in v0.106.0

func (mb *MetricsBuilder) RecordVcenterVMVsanThroughputDataPoint(ts pcommon.Timestamp, val float64, vsanThroughputDirectionAttributeValue AttributeVsanThroughputDirection)

RecordVcenterVMVsanThroughputDataPoint adds a data point to vcenter.vm.vsan.throughput 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 vcenter metrics builder.

func DefaultMetricsBuilderConfig added in v0.73.0

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig added in v0.77.0

type MetricsConfig struct {
	VcenterClusterCPUEffective         MetricConfig `mapstructure:"vcenter.cluster.cpu.effective"`
	VcenterClusterCPULimit             MetricConfig `mapstructure:"vcenter.cluster.cpu.limit"`
	VcenterClusterHostCount            MetricConfig `mapstructure:"vcenter.cluster.host.count"`
	VcenterClusterMemoryEffective      MetricConfig `mapstructure:"vcenter.cluster.memory.effective"`
	VcenterClusterMemoryLimit          MetricConfig `mapstructure:"vcenter.cluster.memory.limit"`
	VcenterClusterVMCount              MetricConfig `mapstructure:"vcenter.cluster.vm.count"`
	VcenterClusterVMTemplateCount      MetricConfig `mapstructure:"vcenter.cluster.vm_template.count"`
	VcenterClusterVsanCongestions      MetricConfig `mapstructure:"vcenter.cluster.vsan.congestions"`
	VcenterClusterVsanLatencyAvg       MetricConfig `mapstructure:"vcenter.cluster.vsan.latency.avg"`
	VcenterClusterVsanOperations       MetricConfig `mapstructure:"vcenter.cluster.vsan.operations"`
	VcenterClusterVsanThroughput       MetricConfig `mapstructure:"vcenter.cluster.vsan.throughput"`
	VcenterDatacenterClusterCount      MetricConfig `mapstructure:"vcenter.datacenter.cluster.count"`
	VcenterDatacenterCPULimit          MetricConfig `mapstructure:"vcenter.datacenter.cpu.limit"`
	VcenterDatacenterDatastoreCount    MetricConfig `mapstructure:"vcenter.datacenter.datastore.count"`
	VcenterDatacenterDiskSpace         MetricConfig `mapstructure:"vcenter.datacenter.disk.space"`
	VcenterDatacenterHostCount         MetricConfig `mapstructure:"vcenter.datacenter.host.count"`
	VcenterDatacenterMemoryLimit       MetricConfig `mapstructure:"vcenter.datacenter.memory.limit"`
	VcenterDatacenterVMCount           MetricConfig `mapstructure:"vcenter.datacenter.vm.count"`
	VcenterDatastoreDiskUsage          MetricConfig `mapstructure:"vcenter.datastore.disk.usage"`
	VcenterDatastoreDiskUtilization    MetricConfig `mapstructure:"vcenter.datastore.disk.utilization"`
	VcenterHostCPUCapacity             MetricConfig `mapstructure:"vcenter.host.cpu.capacity"`
	VcenterHostCPUReserved             MetricConfig `mapstructure:"vcenter.host.cpu.reserved"`
	VcenterHostCPUUsage                MetricConfig `mapstructure:"vcenter.host.cpu.usage"`
	VcenterHostCPUUtilization          MetricConfig `mapstructure:"vcenter.host.cpu.utilization"`
	VcenterHostDiskLatencyAvg          MetricConfig `mapstructure:"vcenter.host.disk.latency.avg"`
	VcenterHostDiskLatencyMax          MetricConfig `mapstructure:"vcenter.host.disk.latency.max"`
	VcenterHostDiskThroughput          MetricConfig `mapstructure:"vcenter.host.disk.throughput"`
	VcenterHostMemoryUsage             MetricConfig `mapstructure:"vcenter.host.memory.usage"`
	VcenterHostMemoryUtilization       MetricConfig `mapstructure:"vcenter.host.memory.utilization"`
	VcenterHostNetworkPacketDropRate   MetricConfig `mapstructure:"vcenter.host.network.packet.drop.rate"`
	VcenterHostNetworkPacketErrorRate  MetricConfig `mapstructure:"vcenter.host.network.packet.error.rate"`
	VcenterHostNetworkPacketRate       MetricConfig `mapstructure:"vcenter.host.network.packet.rate"`
	VcenterHostNetworkThroughput       MetricConfig `mapstructure:"vcenter.host.network.throughput"`
	VcenterHostNetworkUsage            MetricConfig `mapstructure:"vcenter.host.network.usage"`
	VcenterHostVsanCacheHitRate        MetricConfig `mapstructure:"vcenter.host.vsan.cache.hit_rate"`
	VcenterHostVsanCongestions         MetricConfig `mapstructure:"vcenter.host.vsan.congestions"`
	VcenterHostVsanLatencyAvg          MetricConfig `mapstructure:"vcenter.host.vsan.latency.avg"`
	VcenterHostVsanOperations          MetricConfig `mapstructure:"vcenter.host.vsan.operations"`
	VcenterHostVsanThroughput          MetricConfig `mapstructure:"vcenter.host.vsan.throughput"`
	VcenterResourcePoolCPUShares       MetricConfig `mapstructure:"vcenter.resource_pool.cpu.shares"`
	VcenterResourcePoolCPUUsage        MetricConfig `mapstructure:"vcenter.resource_pool.cpu.usage"`
	VcenterResourcePoolMemoryBallooned MetricConfig `mapstructure:"vcenter.resource_pool.memory.ballooned"`
	VcenterResourcePoolMemoryGranted   MetricConfig `mapstructure:"vcenter.resource_pool.memory.granted"`
	VcenterResourcePoolMemoryShares    MetricConfig `mapstructure:"vcenter.resource_pool.memory.shares"`
	VcenterResourcePoolMemorySwapped   MetricConfig `mapstructure:"vcenter.resource_pool.memory.swapped"`
	VcenterResourcePoolMemoryUsage     MetricConfig `mapstructure:"vcenter.resource_pool.memory.usage"`
	VcenterVMCPUReadiness              MetricConfig `mapstructure:"vcenter.vm.cpu.readiness"`
	VcenterVMCPUUsage                  MetricConfig `mapstructure:"vcenter.vm.cpu.usage"`
	VcenterVMCPUUtilization            MetricConfig `mapstructure:"vcenter.vm.cpu.utilization"`
	VcenterVMDiskLatencyAvg            MetricConfig `mapstructure:"vcenter.vm.disk.latency.avg"`
	VcenterVMDiskLatencyMax            MetricConfig `mapstructure:"vcenter.vm.disk.latency.max"`
	VcenterVMDiskThroughput            MetricConfig `mapstructure:"vcenter.vm.disk.throughput"`
	VcenterVMDiskUsage                 MetricConfig `mapstructure:"vcenter.vm.disk.usage"`
	VcenterVMDiskUtilization           MetricConfig `mapstructure:"vcenter.vm.disk.utilization"`
	VcenterVMMemoryBallooned           MetricConfig `mapstructure:"vcenter.vm.memory.ballooned"`
	VcenterVMMemorySwapped             MetricConfig `mapstructure:"vcenter.vm.memory.swapped"`
	VcenterVMMemorySwappedSsd          MetricConfig `mapstructure:"vcenter.vm.memory.swapped_ssd"`
	VcenterVMMemoryUsage               MetricConfig `mapstructure:"vcenter.vm.memory.usage"`
	VcenterVMMemoryUtilization         MetricConfig `mapstructure:"vcenter.vm.memory.utilization"`
	VcenterVMNetworkPacketDropRate     MetricConfig `mapstructure:"vcenter.vm.network.packet.drop.rate"`
	VcenterVMNetworkPacketRate         MetricConfig `mapstructure:"vcenter.vm.network.packet.rate"`
	VcenterVMNetworkThroughput         MetricConfig `mapstructure:"vcenter.vm.network.throughput"`
	VcenterVMNetworkUsage              MetricConfig `mapstructure:"vcenter.vm.network.usage"`
	VcenterVMVsanLatencyAvg            MetricConfig `mapstructure:"vcenter.vm.vsan.latency.avg"`
	VcenterVMVsanOperations            MetricConfig `mapstructure:"vcenter.vm.vsan.operations"`
	VcenterVMVsanThroughput            MetricConfig `mapstructure:"vcenter.vm.vsan.throughput"`
}

MetricsConfig provides config for vcenter 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 {
	VcenterClusterName               ResourceAttributeConfig `mapstructure:"vcenter.cluster.name"`
	VcenterDatacenterName            ResourceAttributeConfig `mapstructure:"vcenter.datacenter.name"`
	VcenterDatastoreName             ResourceAttributeConfig `mapstructure:"vcenter.datastore.name"`
	VcenterHostName                  ResourceAttributeConfig `mapstructure:"vcenter.host.name"`
	VcenterResourcePoolInventoryPath ResourceAttributeConfig `mapstructure:"vcenter.resource_pool.inventory_path"`
	VcenterResourcePoolName          ResourceAttributeConfig `mapstructure:"vcenter.resource_pool.name"`
	VcenterVirtualAppInventoryPath   ResourceAttributeConfig `mapstructure:"vcenter.virtual_app.inventory_path"`
	VcenterVirtualAppName            ResourceAttributeConfig `mapstructure:"vcenter.virtual_app.name"`
	VcenterVMID                      ResourceAttributeConfig `mapstructure:"vcenter.vm.id"`
	VcenterVMName                    ResourceAttributeConfig `mapstructure:"vcenter.vm.name"`
	VcenterVMTemplateID              ResourceAttributeConfig `mapstructure:"vcenter.vm_template.id"`
	VcenterVMTemplateName            ResourceAttributeConfig `mapstructure:"vcenter.vm_template.name"`
}

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

func (rb *ResourceBuilder) SetVcenterClusterName(val string)

SetVcenterClusterName sets provided value as "vcenter.cluster.name" attribute.

func (*ResourceBuilder) SetVcenterDatacenterName added in v0.100.0

func (rb *ResourceBuilder) SetVcenterDatacenterName(val string)

SetVcenterDatacenterName sets provided value as "vcenter.datacenter.name" attribute.

func (*ResourceBuilder) SetVcenterDatastoreName added in v0.82.0

func (rb *ResourceBuilder) SetVcenterDatastoreName(val string)

SetVcenterDatastoreName sets provided value as "vcenter.datastore.name" attribute.

func (*ResourceBuilder) SetVcenterHostName added in v0.82.0

func (rb *ResourceBuilder) SetVcenterHostName(val string)

SetVcenterHostName sets provided value as "vcenter.host.name" attribute.

func (*ResourceBuilder) SetVcenterResourcePoolInventoryPath added in v0.84.0

func (rb *ResourceBuilder) SetVcenterResourcePoolInventoryPath(val string)

SetVcenterResourcePoolInventoryPath sets provided value as "vcenter.resource_pool.inventory_path" attribute.

func (*ResourceBuilder) SetVcenterResourcePoolName added in v0.82.0

func (rb *ResourceBuilder) SetVcenterResourcePoolName(val string)

SetVcenterResourcePoolName sets provided value as "vcenter.resource_pool.name" attribute.

func (*ResourceBuilder) SetVcenterVMID added in v0.82.0

func (rb *ResourceBuilder) SetVcenterVMID(val string)

SetVcenterVMID sets provided value as "vcenter.vm.id" attribute.

func (*ResourceBuilder) SetVcenterVMName added in v0.82.0

func (rb *ResourceBuilder) SetVcenterVMName(val string)

SetVcenterVMName sets provided value as "vcenter.vm.name" attribute.

func (*ResourceBuilder) SetVcenterVMTemplateID added in v0.100.0

func (rb *ResourceBuilder) SetVcenterVMTemplateID(val string)

SetVcenterVMTemplateID sets provided value as "vcenter.vm_template.id" attribute.

func (*ResourceBuilder) SetVcenterVMTemplateName added in v0.100.0

func (rb *ResourceBuilder) SetVcenterVMTemplateName(val string)

SetVcenterVMTemplateName sets provided value as "vcenter.vm_template.name" attribute.

func (*ResourceBuilder) SetVcenterVirtualAppInventoryPath added in v0.100.0

func (rb *ResourceBuilder) SetVcenterVirtualAppInventoryPath(val string)

SetVcenterVirtualAppInventoryPath sets provided value as "vcenter.virtual_app.inventory_path" attribute.

func (*ResourceBuilder) SetVcenterVirtualAppName added in v0.100.0

func (rb *ResourceBuilder) SetVcenterVirtualAppName(val string)

SetVcenterVirtualAppName sets provided value as "vcenter.virtual_app.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