telemetry

package
v0.0.0-...-11eec13 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Copyright © 2025 MicroShift Contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DeploymentTypeBootC  = "bootc"
	DeploymentTypeOSTree = "ostree"
	DeploymentTypeRPM    = "rpm"
)
View Source
const (
	MetricNameCPUCapacity       = "cluster:capacity_cpu_cores:sum"
	MetricNameMemoryCapacity    = "cluster:capacity_memory_bytes:sum"
	MetricNameCPUUsage          = "cluster:cpu_usage_cores:sum"
	MetricNameMemoryUsage       = "cluster:memory_usage_bytes:sum"
	MetricNameResourceUsage     = "cluster:usage:resources:sum"
	MetricNameContainersUsage   = "cluster:usage:containers:sum"
	MetricNameMicroShiftVersion = "microshift_version"

	LabelNameID             = "_id"
	LabelNameArch           = "label_kubernetes_io_arch"
	LabelNameOS             = "label_node_openshift_io_os_id"
	LabelNameInstanceType   = "label_beta_kubernetes_io_instance_type"
	LabelNameResource       = "resource"
	LabelNameVersion        = "version"
	LabelNameDeploymentType = "deployment_type"
	LabelNameOSVersion      = "os_version_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Name      string
	Labels    []MetricLabel
	Timestamp int64
	Value     float64
}

type MetricLabel

type MetricLabel struct {
	Name  string
	Value string
}

type TelemetryClient

type TelemetryClient struct {
	// contains filtered or unexported fields
}

func NewTelemetryClient

func NewTelemetryClient(endpoint, clusterId, proxy string) *TelemetryClient

func (*TelemetryClient) Collect

func (t *TelemetryClient) Collect(ctx context.Context, cfg *config.Config) ([]Metric, error)

func (*TelemetryClient) Send

func (t *TelemetryClient) Send(ctx context.Context, pullSecret string, metrics []Metric) error

Jump to

Keyboard shortcuts

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