package k8sconv

import "go.opentelemetry.io/otel/semconv/v1.32.0/k8sconv"

Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "k8s" namespace.

Index

Types

type CronJobActiveJobs

type CronJobActiveJobs struct {
	metric.Int64UpDownCounter
}

CronJobActiveJobs is an instrument used to record metric values conforming to the "k8s.cronjob.active_jobs" semantic conventions. It represents the number of actively running jobs for a cronjob.

func NewCronJobActiveJobs

func NewCronJobActiveJobs(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (CronJobActiveJobs, error)

NewCronJobActiveJobs returns a new CronJobActiveJobs instrument.

func (CronJobActiveJobs) Add

func (m CronJobActiveJobs) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `active` field of the [K8s CronJobStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.cronjob`] resource.

[K8s CronJobStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#cronjobstatus-v1-batch [`k8s.cronjob`]: ../resource/k8s.md#cronjob

func (CronJobActiveJobs) Description

func (CronJobActiveJobs) Description() string

Description returns the semantic convention description of the instrument

func (CronJobActiveJobs) Inst

Inst returns the underlying metric instrument.

func (CronJobActiveJobs) Name

func (CronJobActiveJobs) Name() string

Name returns the semantic convention name of the instrument.

func (CronJobActiveJobs) Unit

func (CronJobActiveJobs) Unit() string

Unit returns the semantic convention unit of the instrument

type DaemonSetCurrentScheduledNodes

type DaemonSetCurrentScheduledNodes struct {
	metric.Int64UpDownCounter
}

DaemonSetCurrentScheduledNodes is an instrument used to record metric values conforming to the "k8s.daemonset.current_scheduled_nodes" semantic conventions. It represents the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod.

func NewDaemonSetCurrentScheduledNodes

func NewDaemonSetCurrentScheduledNodes(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DaemonSetCurrentScheduledNodes, error)

NewDaemonSetCurrentScheduledNodes returns a new DaemonSetCurrentScheduledNodes instrument.

func (DaemonSetCurrentScheduledNodes) Add

Add adds incr to the existing count.

This metric aligns with the `currentNumberScheduled` field of the [K8s DaemonSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.daemonset`] resource.

[K8s DaemonSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps [`k8s.daemonset`]: ../resource/k8s.md#daemonset

func (DaemonSetCurrentScheduledNodes) Description

func (DaemonSetCurrentScheduledNodes) Description() string

Description returns the semantic convention description of the instrument

func (DaemonSetCurrentScheduledNodes) Inst

Inst returns the underlying metric instrument.

func (DaemonSetCurrentScheduledNodes) Name

Name returns the semantic convention name of the instrument.

func (DaemonSetCurrentScheduledNodes) Unit

Unit returns the semantic convention unit of the instrument

type DaemonSetDesiredScheduledNodes

type DaemonSetDesiredScheduledNodes struct {
	metric.Int64UpDownCounter
}

DaemonSetDesiredScheduledNodes is an instrument used to record metric values conforming to the "k8s.daemonset.desired_scheduled_nodes" semantic conventions. It represents the number of nodes that should be running the daemon pod (including nodes currently running the daemon pod).

func NewDaemonSetDesiredScheduledNodes

func NewDaemonSetDesiredScheduledNodes(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DaemonSetDesiredScheduledNodes, error)

NewDaemonSetDesiredScheduledNodes returns a new DaemonSetDesiredScheduledNodes instrument.

func (DaemonSetDesiredScheduledNodes) Add

Add adds incr to the existing count.

This metric aligns with the `desiredNumberScheduled` field of the [K8s DaemonSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.daemonset`] resource.

[K8s DaemonSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps [`k8s.daemonset`]: ../resource/k8s.md#daemonset

func (DaemonSetDesiredScheduledNodes) Description

func (DaemonSetDesiredScheduledNodes) Description() string

Description returns the semantic convention description of the instrument

func (DaemonSetDesiredScheduledNodes) Inst

Inst returns the underlying metric instrument.

func (DaemonSetDesiredScheduledNodes) Name

Name returns the semantic convention name of the instrument.

func (DaemonSetDesiredScheduledNodes) Unit

Unit returns the semantic convention unit of the instrument

type DaemonSetMisscheduledNodes

type DaemonSetMisscheduledNodes struct {
	metric.Int64UpDownCounter
}

DaemonSetMisscheduledNodes is an instrument used to record metric values conforming to the "k8s.daemonset.misscheduled_nodes" semantic conventions. It represents the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod.

func NewDaemonSetMisscheduledNodes

func NewDaemonSetMisscheduledNodes(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DaemonSetMisscheduledNodes, error)

NewDaemonSetMisscheduledNodes returns a new DaemonSetMisscheduledNodes instrument.

func (DaemonSetMisscheduledNodes) Add

Add adds incr to the existing count.

This metric aligns with the `numberMisscheduled` field of the [K8s DaemonSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.daemonset`] resource.

[K8s DaemonSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps [`k8s.daemonset`]: ../resource/k8s.md#daemonset

func (DaemonSetMisscheduledNodes) Description

func (DaemonSetMisscheduledNodes) Description() string

Description returns the semantic convention description of the instrument

func (DaemonSetMisscheduledNodes) Inst

Inst returns the underlying metric instrument.

func (DaemonSetMisscheduledNodes) Name

Name returns the semantic convention name of the instrument.

func (DaemonSetMisscheduledNodes) Unit

Unit returns the semantic convention unit of the instrument

type DaemonSetReadyNodes

type DaemonSetReadyNodes struct {
	metric.Int64UpDownCounter
}

DaemonSetReadyNodes is an instrument used to record metric values conforming to the "k8s.daemonset.ready_nodes" semantic conventions. It represents the number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.

func NewDaemonSetReadyNodes

func NewDaemonSetReadyNodes(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DaemonSetReadyNodes, error)

NewDaemonSetReadyNodes returns a new DaemonSetReadyNodes instrument.

func (DaemonSetReadyNodes) Add

func (m DaemonSetReadyNodes) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `numberReady` field of the [K8s DaemonSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.daemonset`] resource.

[K8s DaemonSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps [`k8s.daemonset`]: ../resource/k8s.md#daemonset

func (DaemonSetReadyNodes) Description

func (DaemonSetReadyNodes) Description() string

Description returns the semantic convention description of the instrument

func (DaemonSetReadyNodes) Inst

Inst returns the underlying metric instrument.

func (DaemonSetReadyNodes) Name

func (DaemonSetReadyNodes) Name() string

Name returns the semantic convention name of the instrument.

func (DaemonSetReadyNodes) Unit

func (DaemonSetReadyNodes) Unit() string

Unit returns the semantic convention unit of the instrument

type DeploymentAvailablePods

type DeploymentAvailablePods struct {
	metric.Int64UpDownCounter
}

DeploymentAvailablePods is an instrument used to record metric values conforming to the "k8s.deployment.available_pods" semantic conventions. It represents the total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment.

func NewDeploymentAvailablePods

func NewDeploymentAvailablePods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DeploymentAvailablePods, error)

NewDeploymentAvailablePods returns a new DeploymentAvailablePods instrument.

func (DeploymentAvailablePods) Add

func (m DeploymentAvailablePods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `availableReplicas` field of the [K8s DeploymentStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.deployment`] resource.

[K8s DeploymentStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentstatus-v1-apps [`k8s.deployment`]: ../resource/k8s.md#deployment

func (DeploymentAvailablePods) Description

func (DeploymentAvailablePods) Description() string

Description returns the semantic convention description of the instrument

func (DeploymentAvailablePods) Inst

Inst returns the underlying metric instrument.

func (DeploymentAvailablePods) Name

Name returns the semantic convention name of the instrument.

func (DeploymentAvailablePods) Unit

Unit returns the semantic convention unit of the instrument

type DeploymentDesiredPods

type DeploymentDesiredPods struct {
	metric.Int64UpDownCounter
}

DeploymentDesiredPods is an instrument used to record metric values conforming to the "k8s.deployment.desired_pods" semantic conventions. It represents the number of desired replica pods in this deployment.

func NewDeploymentDesiredPods

func NewDeploymentDesiredPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (DeploymentDesiredPods, error)

NewDeploymentDesiredPods returns a new DeploymentDesiredPods instrument.

func (DeploymentDesiredPods) Add

func (m DeploymentDesiredPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `replicas` field of the [K8s DeploymentSpec].

This metric SHOULD, at a minimum, be reported against a [`k8s.deployment`] resource.

[K8s DeploymentSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentspec-v1-apps [`k8s.deployment`]: ../resource/k8s.md#deployment

func (DeploymentDesiredPods) Description

func (DeploymentDesiredPods) Description() string

Description returns the semantic convention description of the instrument

func (DeploymentDesiredPods) Inst

Inst returns the underlying metric instrument.

func (DeploymentDesiredPods) Name

Name returns the semantic convention name of the instrument.

func (DeploymentDesiredPods) Unit

Unit returns the semantic convention unit of the instrument

type HPACurrentPods

type HPACurrentPods struct {
	metric.Int64UpDownCounter
}

HPACurrentPods is an instrument used to record metric values conforming to the "k8s.hpa.current_pods" semantic conventions. It represents the current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler.

func NewHPACurrentPods

func NewHPACurrentPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (HPACurrentPods, error)

NewHPACurrentPods returns a new HPACurrentPods instrument.

func (HPACurrentPods) Add

func (m HPACurrentPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `currentReplicas` field of the [K8s HorizontalPodAutoscalerStatus]

This metric SHOULD, at a minimum, be reported against a [`k8s.hpa`] resource.

[K8s HorizontalPodAutoscalerStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling [`k8s.hpa`]: ../resource/k8s.md#horizontalpodautoscaler

func (HPACurrentPods) Description

func (HPACurrentPods) Description() string

Description returns the semantic convention description of the instrument

func (HPACurrentPods) Inst

Inst returns the underlying metric instrument.

func (HPACurrentPods) Name

func (HPACurrentPods) Name() string

Name returns the semantic convention name of the instrument.

func (HPACurrentPods) Unit

func (HPACurrentPods) Unit() string

Unit returns the semantic convention unit of the instrument

type HPADesiredPods

type HPADesiredPods struct {
	metric.Int64UpDownCounter
}

HPADesiredPods is an instrument used to record metric values conforming to the "k8s.hpa.desired_pods" semantic conventions. It represents the desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler.

func NewHPADesiredPods

func NewHPADesiredPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (HPADesiredPods, error)

NewHPADesiredPods returns a new HPADesiredPods instrument.

func (HPADesiredPods) Add

func (m HPADesiredPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `desiredReplicas` field of the [K8s HorizontalPodAutoscalerStatus]

This metric SHOULD, at a minimum, be reported against a [`k8s.hpa`] resource.

[K8s HorizontalPodAutoscalerStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling [`k8s.hpa`]: ../resource/k8s.md#horizontalpodautoscaler

func (HPADesiredPods) Description

func (HPADesiredPods) Description() string

Description returns the semantic convention description of the instrument

func (HPADesiredPods) Inst

Inst returns the underlying metric instrument.

func (HPADesiredPods) Name

func (HPADesiredPods) Name() string

Name returns the semantic convention name of the instrument.

func (HPADesiredPods) Unit

func (HPADesiredPods) Unit() string

Unit returns the semantic convention unit of the instrument

type HPAMaxPods

type HPAMaxPods struct {
	metric.Int64UpDownCounter
}

HPAMaxPods is an instrument used to record metric values conforming to the "k8s.hpa.max_pods" semantic conventions. It represents the upper limit for the number of replica pods to which the autoscaler can scale up.

func NewHPAMaxPods

func NewHPAMaxPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (HPAMaxPods, error)

NewHPAMaxPods returns a new HPAMaxPods instrument.

func (HPAMaxPods) Add

func (m HPAMaxPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `maxReplicas` field of the [K8s HorizontalPodAutoscalerSpec]

This metric SHOULD, at a minimum, be reported against a [`k8s.hpa`] resource.

[K8s HorizontalPodAutoscalerSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling [`k8s.hpa`]: ../resource/k8s.md#horizontalpodautoscaler

func (HPAMaxPods) Description

func (HPAMaxPods) Description() string

Description returns the semantic convention description of the instrument

func (HPAMaxPods) Inst

Inst returns the underlying metric instrument.

func (HPAMaxPods) Name

func (HPAMaxPods) Name() string

Name returns the semantic convention name of the instrument.

func (HPAMaxPods) Unit

func (HPAMaxPods) Unit() string

Unit returns the semantic convention unit of the instrument

type HPAMinPods

type HPAMinPods struct {
	metric.Int64UpDownCounter
}

HPAMinPods is an instrument used to record metric values conforming to the "k8s.hpa.min_pods" semantic conventions. It represents the lower limit for the number of replica pods to which the autoscaler can scale down.

func NewHPAMinPods

func NewHPAMinPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (HPAMinPods, error)

NewHPAMinPods returns a new HPAMinPods instrument.

func (HPAMinPods) Add

func (m HPAMinPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `minReplicas` field of the [K8s HorizontalPodAutoscalerSpec]

This metric SHOULD, at a minimum, be reported against a [`k8s.hpa`] resource.

[K8s HorizontalPodAutoscalerSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling [`k8s.hpa`]: ../resource/k8s.md#horizontalpodautoscaler

func (HPAMinPods) Description

func (HPAMinPods) Description() string

Description returns the semantic convention description of the instrument

func (HPAMinPods) Inst

Inst returns the underlying metric instrument.

func (HPAMinPods) Name

func (HPAMinPods) Name() string

Name returns the semantic convention name of the instrument.

func (HPAMinPods) Unit

func (HPAMinPods) Unit() string

Unit returns the semantic convention unit of the instrument

type JobActivePods

type JobActivePods struct {
	metric.Int64UpDownCounter
}

JobActivePods is an instrument used to record metric values conforming to the "k8s.job.active_pods" semantic conventions. It represents the number of pending and actively running pods for a job.

func NewJobActivePods

func NewJobActivePods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (JobActivePods, error)

NewJobActivePods returns a new JobActivePods instrument.

func (JobActivePods) Add

func (m JobActivePods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `active` field of the [K8s JobStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.job`] resource.

[K8s JobStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch [`k8s.job`]: ../resource/k8s.md#job

func (JobActivePods) Description

func (JobActivePods) Description() string

Description returns the semantic convention description of the instrument

func (JobActivePods) Inst

Inst returns the underlying metric instrument.

func (JobActivePods) Name

func (JobActivePods) Name() string

Name returns the semantic convention name of the instrument.

func (JobActivePods) Unit

func (JobActivePods) Unit() string

Unit returns the semantic convention unit of the instrument

type JobDesiredSuccessfulPods

type JobDesiredSuccessfulPods struct {
	metric.Int64UpDownCounter
}

JobDesiredSuccessfulPods is an instrument used to record metric values conforming to the "k8s.job.desired_successful_pods" semantic conventions. It represents the desired number of successfully finished pods the job should be run with.

func NewJobDesiredSuccessfulPods

func NewJobDesiredSuccessfulPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (JobDesiredSuccessfulPods, error)

NewJobDesiredSuccessfulPods returns a new JobDesiredSuccessfulPods instrument.

func (JobDesiredSuccessfulPods) Add

func (m JobDesiredSuccessfulPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `completions` field of the [K8s JobSpec].

This metric SHOULD, at a minimum, be reported against a [`k8s.job`] resource.

[K8s JobSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch [`k8s.job`]: ../resource/k8s.md#job

func (JobDesiredSuccessfulPods) Description

func (JobDesiredSuccessfulPods) Description() string

Description returns the semantic convention description of the instrument

func (JobDesiredSuccessfulPods) Inst

Inst returns the underlying metric instrument.

func (JobDesiredSuccessfulPods) Name

Name returns the semantic convention name of the instrument.

func (JobDesiredSuccessfulPods) Unit

Unit returns the semantic convention unit of the instrument

type JobFailedPods

type JobFailedPods struct {
	metric.Int64UpDownCounter
}

JobFailedPods is an instrument used to record metric values conforming to the "k8s.job.failed_pods" semantic conventions. It represents the number of pods which reached phase Failed for a job.

func NewJobFailedPods

func NewJobFailedPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (JobFailedPods, error)

NewJobFailedPods returns a new JobFailedPods instrument.

func (JobFailedPods) Add

func (m JobFailedPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `failed` field of the [K8s JobStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.job`] resource.

[K8s JobStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch [`k8s.job`]: ../resource/k8s.md#job

func (JobFailedPods) Description

func (JobFailedPods) Description() string

Description returns the semantic convention description of the instrument

func (JobFailedPods) Inst

Inst returns the underlying metric instrument.

func (JobFailedPods) Name

func (JobFailedPods) Name() string

Name returns the semantic convention name of the instrument.

func (JobFailedPods) Unit

func (JobFailedPods) Unit() string

Unit returns the semantic convention unit of the instrument

type JobMaxParallelPods

type JobMaxParallelPods struct {
	metric.Int64UpDownCounter
}

JobMaxParallelPods is an instrument used to record metric values conforming to the "k8s.job.max_parallel_pods" semantic conventions. It represents the max desired number of pods the job should run at any given time.

func NewJobMaxParallelPods

func NewJobMaxParallelPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (JobMaxParallelPods, error)

NewJobMaxParallelPods returns a new JobMaxParallelPods instrument.

func (JobMaxParallelPods) Add

func (m JobMaxParallelPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `parallelism` field of the [K8s JobSpec].

This metric SHOULD, at a minimum, be reported against a [`k8s.job`] resource.

[K8s JobSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch [`k8s.job`]: ../resource/k8s.md#job

func (JobMaxParallelPods) Description

func (JobMaxParallelPods) Description() string

Description returns the semantic convention description of the instrument

func (JobMaxParallelPods) Inst

Inst returns the underlying metric instrument.

func (JobMaxParallelPods) Name

func (JobMaxParallelPods) Name() string

Name returns the semantic convention name of the instrument.

func (JobMaxParallelPods) Unit

func (JobMaxParallelPods) Unit() string

Unit returns the semantic convention unit of the instrument

type JobSuccessfulPods

type JobSuccessfulPods struct {
	metric.Int64UpDownCounter
}

JobSuccessfulPods is an instrument used to record metric values conforming to the "k8s.job.successful_pods" semantic conventions. It represents the number of pods which reached phase Succeeded for a job.

func NewJobSuccessfulPods

func NewJobSuccessfulPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (JobSuccessfulPods, error)

NewJobSuccessfulPods returns a new JobSuccessfulPods instrument.

func (JobSuccessfulPods) Add

func (m JobSuccessfulPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `succeeded` field of the [K8s JobStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.job`] resource.

[K8s JobStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch [`k8s.job`]: ../resource/k8s.md#job

func (JobSuccessfulPods) Description

func (JobSuccessfulPods) Description() string

Description returns the semantic convention description of the instrument

func (JobSuccessfulPods) Inst

Inst returns the underlying metric instrument.

func (JobSuccessfulPods) Name

func (JobSuccessfulPods) Name() string

Name returns the semantic convention name of the instrument.

func (JobSuccessfulPods) Unit

func (JobSuccessfulPods) Unit() string

Unit returns the semantic convention unit of the instrument

type NamespacePhase

type NamespacePhase struct {
	metric.Int64UpDownCounter
}

NamespacePhase is an instrument used to record metric values conforming to the "k8s.namespace.phase" semantic conventions. It represents the describes number of K8s namespaces that are currently in a given phase.

func NewNamespacePhase

func NewNamespacePhase(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (NamespacePhase, error)

NewNamespacePhase returns a new NamespacePhase instrument.

func (NamespacePhase) Add

func (m NamespacePhase) Add(
	ctx context.Context,
	incr int64,
	namespacePhase NamespacePhaseAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count.

The namespacePhase is the the phase of the K8s namespace.

This metric SHOULD, at a minimum, be reported against a [`k8s.namespace`] resource.

[`k8s.namespace`]: ../resource/k8s.md#namespace

func (NamespacePhase) Description

func (NamespacePhase) Description() string

Description returns the semantic convention description of the instrument

func (NamespacePhase) Inst

Inst returns the underlying metric instrument.

func (NamespacePhase) Name

func (NamespacePhase) Name() string

Name returns the semantic convention name of the instrument.

func (NamespacePhase) Unit

func (NamespacePhase) Unit() string

Unit returns the semantic convention unit of the instrument

type NamespacePhaseAttr

type NamespacePhaseAttr string

NamespacePhaseAttr is an attribute conforming to the k8s.namespace.phase semantic conventions. It represents the phase of the K8s namespace.

var (
	// NamespacePhaseActive is the active namespace phase as described by [K8s API]
	// .
	//
	// [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
	NamespacePhaseActive NamespacePhaseAttr = "active"
	// NamespacePhaseTerminating is the terminating namespace phase as described by
	// [K8s API].
	//
	// [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
	NamespacePhaseTerminating NamespacePhaseAttr = "terminating"
)

type NetworkIODirectionAttr

type NetworkIODirectionAttr string

NetworkIODirectionAttr is an attribute conforming to the network.io.direction semantic conventions. It represents the network IO operation direction.

var (
	// NetworkIODirectionTransmit is the none.
	NetworkIODirectionTransmit NetworkIODirectionAttr = "transmit"
	// NetworkIODirectionReceive is the none.
	NetworkIODirectionReceive NetworkIODirectionAttr = "receive"
)

type NodeCPUTime

type NodeCPUTime struct {
	metric.Float64Counter
}

NodeCPUTime is an instrument used to record metric values conforming to the "k8s.node.cpu.time" semantic conventions. It represents the total CPU time consumed.

func NewNodeCPUTime

func NewNodeCPUTime(
	m metric.Meter,
	opt ...metric.Float64CounterOption,
) (NodeCPUTime, error)

NewNodeCPUTime returns a new NodeCPUTime instrument.

func (NodeCPUTime) Add

func (m NodeCPUTime) Add(ctx context.Context, incr float64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

Total CPU time consumed by the specific Node on all available CPU cores

func (NodeCPUTime) Description

func (NodeCPUTime) Description() string

Description returns the semantic convention description of the instrument

func (NodeCPUTime) Inst

Inst returns the underlying metric instrument.

func (NodeCPUTime) Name

func (NodeCPUTime) Name() string

Name returns the semantic convention name of the instrument.

func (NodeCPUTime) Unit

func (NodeCPUTime) Unit() string

Unit returns the semantic convention unit of the instrument

type NodeCPUUsage

type NodeCPUUsage struct {
	metric.Int64Gauge
}

NodeCPUUsage is an instrument used to record metric values conforming to the "k8s.node.cpu.usage" semantic conventions. It represents the node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.

func NewNodeCPUUsage

func NewNodeCPUUsage(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (NodeCPUUsage, error)

NewNodeCPUUsage returns a new NodeCPUUsage instrument.

func (NodeCPUUsage) Description

func (NodeCPUUsage) Description() string

Description returns the semantic convention description of the instrument

func (NodeCPUUsage) Inst

func (m NodeCPUUsage) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (NodeCPUUsage) Name

func (NodeCPUUsage) Name() string

Name returns the semantic convention name of the instrument.

func (NodeCPUUsage) Record

func (m NodeCPUUsage) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)

Record records val to the current distribution.

CPU usage of the specific Node on all available CPU cores, averaged over the sample window

func (NodeCPUUsage) Unit

func (NodeCPUUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type NodeMemoryUsage

type NodeMemoryUsage struct {
	metric.Int64Gauge
}

NodeMemoryUsage is an instrument used to record metric values conforming to the "k8s.node.memory.usage" semantic conventions. It represents the memory usage of the Node.

func NewNodeMemoryUsage

func NewNodeMemoryUsage(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (NodeMemoryUsage, error)

NewNodeMemoryUsage returns a new NodeMemoryUsage instrument.

func (NodeMemoryUsage) Description

func (NodeMemoryUsage) Description() string

Description returns the semantic convention description of the instrument

func (NodeMemoryUsage) Inst

Inst returns the underlying metric instrument.

func (NodeMemoryUsage) Name

func (NodeMemoryUsage) Name() string

Name returns the semantic convention name of the instrument.

func (NodeMemoryUsage) Record

func (m NodeMemoryUsage) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)

Record records val to the current distribution.

Total memory usage of the Node

func (NodeMemoryUsage) Unit

func (NodeMemoryUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type NodeNetworkErrors

type NodeNetworkErrors struct {
	metric.Int64Counter
}

NodeNetworkErrors is an instrument used to record metric values conforming to the "k8s.node.network.errors" semantic conventions. It represents the node network errors.

func NewNodeNetworkErrors

func NewNodeNetworkErrors(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NodeNetworkErrors, error)

NewNodeNetworkErrors returns a new NodeNetworkErrors instrument.

func (NodeNetworkErrors) Add

func (m NodeNetworkErrors) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

func (NodeNetworkErrors) AttrNetworkIODirection

func (NodeNetworkErrors) AttrNetworkIODirection(val NetworkIODirectionAttr) attribute.KeyValue

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (NodeNetworkErrors) AttrNetworkInterfaceName

func (NodeNetworkErrors) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (NodeNetworkErrors) Description

func (NodeNetworkErrors) Description() string

Description returns the semantic convention description of the instrument

func (NodeNetworkErrors) Inst

Inst returns the underlying metric instrument.

func (NodeNetworkErrors) Name

func (NodeNetworkErrors) Name() string

Name returns the semantic convention name of the instrument.

func (NodeNetworkErrors) Unit

func (NodeNetworkErrors) Unit() string

Unit returns the semantic convention unit of the instrument

type NodeNetworkIO

type NodeNetworkIO struct {
	metric.Int64Counter
}

NodeNetworkIO is an instrument used to record metric values conforming to the "k8s.node.network.io" semantic conventions. It represents the network bytes for the Node.

func NewNodeNetworkIO

func NewNodeNetworkIO(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (NodeNetworkIO, error)

NewNodeNetworkIO returns a new NodeNetworkIO instrument.

func (NodeNetworkIO) Add

func (m NodeNetworkIO) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

func (NodeNetworkIO) AttrNetworkIODirection

func (NodeNetworkIO) AttrNetworkIODirection(val NetworkIODirectionAttr) attribute.KeyValue

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (NodeNetworkIO) AttrNetworkInterfaceName

func (NodeNetworkIO) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (NodeNetworkIO) Description

func (NodeNetworkIO) Description() string

Description returns the semantic convention description of the instrument

func (NodeNetworkIO) Inst

Inst returns the underlying metric instrument.

func (NodeNetworkIO) Name

func (NodeNetworkIO) Name() string

Name returns the semantic convention name of the instrument.

func (NodeNetworkIO) Unit

func (NodeNetworkIO) Unit() string

Unit returns the semantic convention unit of the instrument

type NodeUptime

type NodeUptime struct {
	metric.Float64Gauge
}

NodeUptime is an instrument used to record metric values conforming to the "k8s.node.uptime" semantic conventions. It represents the time the Node has been running.

func NewNodeUptime

func NewNodeUptime(
	m metric.Meter,
	opt ...metric.Float64GaugeOption,
) (NodeUptime, error)

NewNodeUptime returns a new NodeUptime instrument.

func (NodeUptime) Description

func (NodeUptime) Description() string

Description returns the semantic convention description of the instrument

func (NodeUptime) Inst

func (m NodeUptime) Inst() metric.Float64Gauge

Inst returns the underlying metric instrument.

func (NodeUptime) Name

func (NodeUptime) Name() string

Name returns the semantic convention name of the instrument.

func (NodeUptime) Record

func (m NodeUptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)

Record records val to the current distribution.

Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

func (NodeUptime) Unit

func (NodeUptime) Unit() string

Unit returns the semantic convention unit of the instrument

type PodCPUTime

type PodCPUTime struct {
	metric.Float64Counter
}

PodCPUTime is an instrument used to record metric values conforming to the "k8s.pod.cpu.time" semantic conventions. It represents the total CPU time consumed.

func NewPodCPUTime

func NewPodCPUTime(
	m metric.Meter,
	opt ...metric.Float64CounterOption,
) (PodCPUTime, error)

NewPodCPUTime returns a new PodCPUTime instrument.

func (PodCPUTime) Add

func (m PodCPUTime) Add(ctx context.Context, incr float64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

Total CPU time consumed by the specific Pod on all available CPU cores

func (PodCPUTime) Description

func (PodCPUTime) Description() string

Description returns the semantic convention description of the instrument

func (PodCPUTime) Inst

func (m PodCPUTime) Inst() metric.Float64Counter

Inst returns the underlying metric instrument.

func (PodCPUTime) Name

func (PodCPUTime) Name() string

Name returns the semantic convention name of the instrument.

func (PodCPUTime) Unit

func (PodCPUTime) Unit() string

Unit returns the semantic convention unit of the instrument

type PodCPUUsage

type PodCPUUsage struct {
	metric.Int64Gauge
}

PodCPUUsage is an instrument used to record metric values conforming to the "k8s.pod.cpu.usage" semantic conventions. It represents the pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.

func NewPodCPUUsage

func NewPodCPUUsage(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (PodCPUUsage, error)

NewPodCPUUsage returns a new PodCPUUsage instrument.

func (PodCPUUsage) Description

func (PodCPUUsage) Description() string

Description returns the semantic convention description of the instrument

func (PodCPUUsage) Inst

func (m PodCPUUsage) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (PodCPUUsage) Name

func (PodCPUUsage) Name() string

Name returns the semantic convention name of the instrument.

func (PodCPUUsage) Record

func (m PodCPUUsage) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)

Record records val to the current distribution.

CPU usage of the specific Pod on all available CPU cores, averaged over the sample window

func (PodCPUUsage) Unit

func (PodCPUUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type PodMemoryUsage

type PodMemoryUsage struct {
	metric.Int64Gauge
}

PodMemoryUsage is an instrument used to record metric values conforming to the "k8s.pod.memory.usage" semantic conventions. It represents the memory usage of the Pod.

func NewPodMemoryUsage

func NewPodMemoryUsage(
	m metric.Meter,
	opt ...metric.Int64GaugeOption,
) (PodMemoryUsage, error)

NewPodMemoryUsage returns a new PodMemoryUsage instrument.

func (PodMemoryUsage) Description

func (PodMemoryUsage) Description() string

Description returns the semantic convention description of the instrument

func (PodMemoryUsage) Inst

func (m PodMemoryUsage) Inst() metric.Int64Gauge

Inst returns the underlying metric instrument.

func (PodMemoryUsage) Name

func (PodMemoryUsage) Name() string

Name returns the semantic convention name of the instrument.

func (PodMemoryUsage) Record

func (m PodMemoryUsage) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)

Record records val to the current distribution.

Total memory usage of the Pod

func (PodMemoryUsage) Unit

func (PodMemoryUsage) Unit() string

Unit returns the semantic convention unit of the instrument

type PodNetworkErrors

type PodNetworkErrors struct {
	metric.Int64Counter
}

PodNetworkErrors is an instrument used to record metric values conforming to the "k8s.pod.network.errors" semantic conventions. It represents the pod network errors.

func NewPodNetworkErrors

func NewPodNetworkErrors(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (PodNetworkErrors, error)

NewPodNetworkErrors returns a new PodNetworkErrors instrument.

func (PodNetworkErrors) Add

func (m PodNetworkErrors) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

func (PodNetworkErrors) AttrNetworkIODirection

func (PodNetworkErrors) AttrNetworkIODirection(val NetworkIODirectionAttr) attribute.KeyValue

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (PodNetworkErrors) AttrNetworkInterfaceName

func (PodNetworkErrors) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (PodNetworkErrors) Description

func (PodNetworkErrors) Description() string

Description returns the semantic convention description of the instrument

func (PodNetworkErrors) Inst

Inst returns the underlying metric instrument.

func (PodNetworkErrors) Name

func (PodNetworkErrors) Name() string

Name returns the semantic convention name of the instrument.

func (PodNetworkErrors) Unit

func (PodNetworkErrors) Unit() string

Unit returns the semantic convention unit of the instrument

type PodNetworkIO

type PodNetworkIO struct {
	metric.Int64Counter
}

PodNetworkIO is an instrument used to record metric values conforming to the "k8s.pod.network.io" semantic conventions. It represents the network bytes for the Pod.

func NewPodNetworkIO

func NewPodNetworkIO(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (PodNetworkIO, error)

NewPodNetworkIO returns a new PodNetworkIO instrument.

func (PodNetworkIO) Add

func (m PodNetworkIO) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

func (PodNetworkIO) AttrNetworkIODirection

func (PodNetworkIO) AttrNetworkIODirection(val NetworkIODirectionAttr) attribute.KeyValue

AttrNetworkIODirection returns an optional attribute for the "network.io.direction" semantic convention. It represents the network IO operation direction.

func (PodNetworkIO) AttrNetworkInterfaceName

func (PodNetworkIO) AttrNetworkInterfaceName(val string) attribute.KeyValue

AttrNetworkInterfaceName returns an optional attribute for the "network.interface.name" semantic convention. It represents the network interface name.

func (PodNetworkIO) Description

func (PodNetworkIO) Description() string

Description returns the semantic convention description of the instrument

func (PodNetworkIO) Inst

func (m PodNetworkIO) Inst() metric.Int64Counter

Inst returns the underlying metric instrument.

func (PodNetworkIO) Name

func (PodNetworkIO) Name() string

Name returns the semantic convention name of the instrument.

func (PodNetworkIO) Unit

func (PodNetworkIO) Unit() string

Unit returns the semantic convention unit of the instrument

type PodUptime

type PodUptime struct {
	metric.Float64Gauge
}

PodUptime is an instrument used to record metric values conforming to the "k8s.pod.uptime" semantic conventions. It represents the time the Pod has been running.

func NewPodUptime

func NewPodUptime(
	m metric.Meter,
	opt ...metric.Float64GaugeOption,
) (PodUptime, error)

NewPodUptime returns a new PodUptime instrument.

func (PodUptime) Description

func (PodUptime) Description() string

Description returns the semantic convention description of the instrument

func (PodUptime) Inst

func (m PodUptime) Inst() metric.Float64Gauge

Inst returns the underlying metric instrument.

func (PodUptime) Name

func (PodUptime) Name() string

Name returns the semantic convention name of the instrument.

func (PodUptime) Record

func (m PodUptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)

Record records val to the current distribution.

Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system.

func (PodUptime) Unit

func (PodUptime) Unit() string

Unit returns the semantic convention unit of the instrument

type ReplicaSetAvailablePods

type ReplicaSetAvailablePods struct {
	metric.Int64UpDownCounter
}

ReplicaSetAvailablePods is an instrument used to record metric values conforming to the "k8s.replicaset.available_pods" semantic conventions. It represents the total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset.

func NewReplicaSetAvailablePods

func NewReplicaSetAvailablePods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ReplicaSetAvailablePods, error)

NewReplicaSetAvailablePods returns a new ReplicaSetAvailablePods instrument.

func (ReplicaSetAvailablePods) Add

func (m ReplicaSetAvailablePods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `availableReplicas` field of the [K8s ReplicaSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.replicaset`] resource.

[K8s ReplicaSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicasetstatus-v1-apps [`k8s.replicaset`]: ../resource/k8s.md#replicaset

func (ReplicaSetAvailablePods) Description

func (ReplicaSetAvailablePods) Description() string

Description returns the semantic convention description of the instrument

func (ReplicaSetAvailablePods) Inst

Inst returns the underlying metric instrument.

func (ReplicaSetAvailablePods) Name

Name returns the semantic convention name of the instrument.

func (ReplicaSetAvailablePods) Unit

Unit returns the semantic convention unit of the instrument

type ReplicaSetDesiredPods

type ReplicaSetDesiredPods struct {
	metric.Int64UpDownCounter
}

ReplicaSetDesiredPods is an instrument used to record metric values conforming to the "k8s.replicaset.desired_pods" semantic conventions. It represents the number of desired replica pods in this replicaset.

func NewReplicaSetDesiredPods

func NewReplicaSetDesiredPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ReplicaSetDesiredPods, error)

NewReplicaSetDesiredPods returns a new ReplicaSetDesiredPods instrument.

func (ReplicaSetDesiredPods) Add

func (m ReplicaSetDesiredPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `replicas` field of the [K8s ReplicaSetSpec].

This metric SHOULD, at a minimum, be reported against a [`k8s.replicaset`] resource.

[K8s ReplicaSetSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicasetspec-v1-apps [`k8s.replicaset`]: ../resource/k8s.md#replicaset

func (ReplicaSetDesiredPods) Description

func (ReplicaSetDesiredPods) Description() string

Description returns the semantic convention description of the instrument

func (ReplicaSetDesiredPods) Inst

Inst returns the underlying metric instrument.

func (ReplicaSetDesiredPods) Name

Name returns the semantic convention name of the instrument.

func (ReplicaSetDesiredPods) Unit

Unit returns the semantic convention unit of the instrument

type ReplicationControllerAvailablePods

type ReplicationControllerAvailablePods struct {
	metric.Int64UpDownCounter
}

ReplicationControllerAvailablePods is an instrument used to record metric values conforming to the "k8s.replicationcontroller.available_pods" semantic conventions. It represents the total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller.

func NewReplicationControllerAvailablePods

func NewReplicationControllerAvailablePods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ReplicationControllerAvailablePods, error)

NewReplicationControllerAvailablePods returns a new ReplicationControllerAvailablePods instrument.

func (ReplicationControllerAvailablePods) Add

Add adds incr to the existing count.

This metric aligns with the `availableReplicas` field of the [K8s ReplicationControllerStatus]

This metric SHOULD, at a minimum, be reported against a [`k8s.replicationcontroller`] resource.

[K8s ReplicationControllerStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core [`k8s.replicationcontroller`]: ../resource/k8s.md#replicationcontroller

func (ReplicationControllerAvailablePods) Description

Description returns the semantic convention description of the instrument

func (ReplicationControllerAvailablePods) Inst

Inst returns the underlying metric instrument.

func (ReplicationControllerAvailablePods) Name

Name returns the semantic convention name of the instrument.

func (ReplicationControllerAvailablePods) Unit

Unit returns the semantic convention unit of the instrument

type ReplicationControllerDesiredPods

type ReplicationControllerDesiredPods struct {
	metric.Int64UpDownCounter
}

ReplicationControllerDesiredPods is an instrument used to record metric values conforming to the "k8s.replicationcontroller.desired_pods" semantic conventions. It represents the number of desired replica pods in this replication controller.

func NewReplicationControllerDesiredPods

func NewReplicationControllerDesiredPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ReplicationControllerDesiredPods, error)

NewReplicationControllerDesiredPods returns a new ReplicationControllerDesiredPods instrument.

func (ReplicationControllerDesiredPods) Add

Add adds incr to the existing count.

This metric aligns with the `replicas` field of the [K8s ReplicationControllerSpec]

This metric SHOULD, at a minimum, be reported against a [`k8s.replicationcontroller`] resource.

[K8s ReplicationControllerSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core [`k8s.replicationcontroller`]: ../resource/k8s.md#replicationcontroller

func (ReplicationControllerDesiredPods) Description

Description returns the semantic convention description of the instrument

func (ReplicationControllerDesiredPods) Inst

Inst returns the underlying metric instrument.

func (ReplicationControllerDesiredPods) Name

Name returns the semantic convention name of the instrument.

func (ReplicationControllerDesiredPods) Unit

Unit returns the semantic convention unit of the instrument

type StatefulSetCurrentPods

type StatefulSetCurrentPods struct {
	metric.Int64UpDownCounter
}

StatefulSetCurrentPods is an instrument used to record metric values conforming to the "k8s.statefulset.current_pods" semantic conventions. It represents the number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision.

func NewStatefulSetCurrentPods

func NewStatefulSetCurrentPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (StatefulSetCurrentPods, error)

NewStatefulSetCurrentPods returns a new StatefulSetCurrentPods instrument.

func (StatefulSetCurrentPods) Add

func (m StatefulSetCurrentPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `currentReplicas` field of the [K8s StatefulSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.statefulset`] resource.

[K8s StatefulSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps [`k8s.statefulset`]: ../resource/k8s.md#statefulset

func (StatefulSetCurrentPods) Description

func (StatefulSetCurrentPods) Description() string

Description returns the semantic convention description of the instrument

func (StatefulSetCurrentPods) Inst

Inst returns the underlying metric instrument.

func (StatefulSetCurrentPods) Name

Name returns the semantic convention name of the instrument.

func (StatefulSetCurrentPods) Unit

Unit returns the semantic convention unit of the instrument

type StatefulSetDesiredPods

type StatefulSetDesiredPods struct {
	metric.Int64UpDownCounter
}

StatefulSetDesiredPods is an instrument used to record metric values conforming to the "k8s.statefulset.desired_pods" semantic conventions. It represents the number of desired replica pods in this statefulset.

func NewStatefulSetDesiredPods

func NewStatefulSetDesiredPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (StatefulSetDesiredPods, error)

NewStatefulSetDesiredPods returns a new StatefulSetDesiredPods instrument.

func (StatefulSetDesiredPods) Add

func (m StatefulSetDesiredPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `replicas` field of the [K8s StatefulSetSpec].

This metric SHOULD, at a minimum, be reported against a [`k8s.statefulset`] resource.

[K8s StatefulSetSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetspec-v1-apps [`k8s.statefulset`]: ../resource/k8s.md#statefulset

func (StatefulSetDesiredPods) Description

func (StatefulSetDesiredPods) Description() string

Description returns the semantic convention description of the instrument

func (StatefulSetDesiredPods) Inst

Inst returns the underlying metric instrument.

func (StatefulSetDesiredPods) Name

Name returns the semantic convention name of the instrument.

func (StatefulSetDesiredPods) Unit

Unit returns the semantic convention unit of the instrument

type StatefulSetReadyPods

type StatefulSetReadyPods struct {
	metric.Int64UpDownCounter
}

StatefulSetReadyPods is an instrument used to record metric values conforming to the "k8s.statefulset.ready_pods" semantic conventions. It represents the number of replica pods created for this statefulset with a Ready Condition.

func NewStatefulSetReadyPods

func NewStatefulSetReadyPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (StatefulSetReadyPods, error)

NewStatefulSetReadyPods returns a new StatefulSetReadyPods instrument.

func (StatefulSetReadyPods) Add

func (m StatefulSetReadyPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `readyReplicas` field of the [K8s StatefulSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.statefulset`] resource.

[K8s StatefulSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps [`k8s.statefulset`]: ../resource/k8s.md#statefulset

func (StatefulSetReadyPods) Description

func (StatefulSetReadyPods) Description() string

Description returns the semantic convention description of the instrument

func (StatefulSetReadyPods) Inst

Inst returns the underlying metric instrument.

func (StatefulSetReadyPods) Name

Name returns the semantic convention name of the instrument.

func (StatefulSetReadyPods) Unit

Unit returns the semantic convention unit of the instrument

type StatefulSetUpdatedPods

type StatefulSetUpdatedPods struct {
	metric.Int64UpDownCounter
}

StatefulSetUpdatedPods is an instrument used to record metric values conforming to the "k8s.statefulset.updated_pods" semantic conventions. It represents the number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision.

func NewStatefulSetUpdatedPods

func NewStatefulSetUpdatedPods(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (StatefulSetUpdatedPods, error)

NewStatefulSetUpdatedPods returns a new StatefulSetUpdatedPods instrument.

func (StatefulSetUpdatedPods) Add

func (m StatefulSetUpdatedPods) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)

Add adds incr to the existing count.

This metric aligns with the `updatedReplicas` field of the [K8s StatefulSetStatus].

This metric SHOULD, at a minimum, be reported against a [`k8s.statefulset`] resource.

[K8s StatefulSetStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps [`k8s.statefulset`]: ../resource/k8s.md#statefulset

func (StatefulSetUpdatedPods) Description

func (StatefulSetUpdatedPods) Description() string

Description returns the semantic convention description of the instrument

func (StatefulSetUpdatedPods) Inst

Inst returns the underlying metric instrument.

func (StatefulSetUpdatedPods) Name

Name returns the semantic convention name of the instrument.

func (StatefulSetUpdatedPods) Unit

Unit returns the semantic convention unit of the instrument

Source Files

metric.go

Version
v1.36.0 (latest)
Published
May 21, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
25 minutes ago

Tools for package owners.