Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/fix_k8s_metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: k8s

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change k8s.replication_controller metrics to k8s.replicationcontroller

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1848]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
8 changes: 4 additions & 4 deletions docs/non-normative/k8s-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ The changes in their metric names and types are the following:

<!-- prettier-ignore-start -->

| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
|------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| `k8s.replication_controller.desired` (type: `gauge`) | `k8s.replication_controller.desired_pods` (type: `updowncounter`) |
| `k8s.replication_controller.available` (type: `gauge`) | `k8s.replication_controller.available_pods` (type: `updowncounter`) |
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
|------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| `k8s.replication_controller.desired` (type: `gauge`) | `k8s.replicationcontroller.desired_pods` (type: `updowncounter`) |
| `k8s.replication_controller.available` (type: `gauge`) | `k8s.replicationcontroller.available_pods` (type: `updowncounter`) |

<!-- prettier-ignore-end -->

Expand Down
18 changes: 9 additions & 9 deletions docs/system/k8s-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`.
- [Metric: `k8s.replicaset.desired_pods`](#metric-k8sreplicasetdesired_pods)
- [Metric: `k8s.replicaset.available_pods`](#metric-k8sreplicasetavailable_pods)
- [ReplicationController Metrics](#replicationcontroller-metrics)
- [Metric: `k8s.replication_controller.desired_pods`](#metric-k8sreplication_controllerdesired_pods)
- [Metric: `k8s.replication_controller.available_pods`](#metric-k8sreplication_controlleravailable_pods)
- [Metric: `k8s.replicationcontroller.desired_pods`](#metric-k8sreplicationcontrollerdesired_pods)
- [Metric: `k8s.replicationcontroller.available_pods`](#metric-k8sreplicationcontrolleravailable_pods)
- [StatefulSet Metrics](#statefulset-metrics)
- [Metric: `k8s.statefulset.desired_pods`](#metric-k8sstatefulsetdesired_pods)
- [Metric: `k8s.statefulset.ready_pods`](#metric-k8sstatefulsetready_pods)
Expand Down Expand Up @@ -504,13 +504,13 @@ This metric SHOULD, at a minimum, be reported against a

## ReplicationController Metrics

**Description:** ReplicationController level metrics captured under the namespace `k8s.replication_controller`.
**Description:** ReplicationController level metrics captured under the namespace `k8s.replicationcontroller`.

### Metric: `k8s.replication_controller.desired_pods`
### Metric: `k8s.replicationcontroller.desired_pods`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.k8s.replication_controller.desired_pods -->
<!-- semconv metric.k8s.replicationcontroller.desired_pods -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
Expand All @@ -519,7 +519,7 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `k8s.replication_controller.desired_pods` | UpDownCounter | `{pod}` | Number of desired replica pods in this replication controller [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `k8s.replicationcontroller.desired_pods` | UpDownCounter | `{pod}` | Number of desired replica pods in this replication controller [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** This metric aligns with the `replicas` field of the
[K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core)
Expand All @@ -532,11 +532,11 @@ This metric SHOULD, at a minimum, be reported against a
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Metric: `k8s.replication_controller.available_pods`
### Metric: `k8s.replicationcontroller.available_pods`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.k8s.replication_controller.available_pods -->
<!-- semconv metric.k8s.replicationcontroller.available_pods -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
Expand All @@ -545,7 +545,7 @@ This metric is [recommended][MetricRecommended].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `k8s.replication_controller.available_pods` | UpDownCounter | `{pod}` | Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `k8s.replicationcontroller.available_pods` | UpDownCounter | `{pod}` | Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** This metric aligns with the `availableReplicas` field of the
[K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core)
Expand Down
29 changes: 29 additions & 0 deletions model/k8s/deprecated/metrics-deprecated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
groups:
- id: metric.k8s.replication_controller.desired_pods
type: metric
metric_name: k8s.replication_controller.desired_pods
stability: experimental
deprecated: "Replaced by `k8s.replicationcontroller.desired_pods`."
brief: "Deprecated, use `k8s.replicationcontroller.desired_pods` instead."
note: |
This metric aligns with the `replicas` field of the
[K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core)

This metric SHOULD, at a minimum, be reported against a
[`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource.
instrument: updowncounter
unit: "{pod}"
- id: metric.k8s.replication_controller.available_pods
type: metric
metric_name: k8s.replication_controller.available_pods
stability: experimental
deprecated: "Replaced by `k8s.replicationcontroller.available_pods`."
brief: "Deprecated, use `k8s.replicationcontroller.available_pods` instead."
note: |
This metric aligns with the `availableReplicas` field of the
[K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core)

This metric SHOULD, at a minimum, be reported against a
[`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource.
instrument: updowncounter
unit: "{pod}"
16 changes: 5 additions & 11 deletions model/k8s/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@ groups:
instrument: updowncounter
unit: "{pod}"

# k8s.replication_controller.* metrics
- id: metric.k8s.replication_controller.desired_pods
# k8s.replicationcontroller.* metrics
- id: metric.k8s.replicationcontroller.desired_pods
type: metric
metric_name: k8s.replication_controller.desired_pods
metric_name: k8s.replicationcontroller.desired_pods
stability: experimental
brief: "Number of desired replica pods in this replication controller"
# TODO: Add note for resource correlation once https://github.com/open-telemetry/semantic-conventions/issues/1656 is implemented
note: |
This metric aligns with the `replicas` field of the
[K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core)
Expand All @@ -198,12 +197,11 @@ groups:
[`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource.
instrument: updowncounter
unit: "{pod}"
- id: metric.k8s.replication_controller.available_pods
- id: metric.k8s.replicationcontroller.available_pods
type: metric
metric_name: k8s.replication_controller.available_pods
metric_name: k8s.replicationcontroller.available_pods
stability: experimental
brief: "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller"
# TODO: Add note for resource correlation once https://github.com/open-telemetry/semantic-conventions/issues/1656 is implemented
note: |
This metric aligns with the `availableReplicas` field of the
[K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core)
Expand Down Expand Up @@ -273,7 +271,6 @@ groups:
metric_name: k8s.hpa.desired_pods
stability: experimental
brief: "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler"
# TODO: Add note for resource correlation once https://github.com/open-telemetry/semantic-conventions/issues/1656 is implemented
note: |
This metric aligns with the `desiredReplicas` field of the
[K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling)
Expand All @@ -287,7 +284,6 @@ groups:
metric_name: k8s.hpa.current_pods
stability: experimental
brief: "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler"
# TODO: Add note for resource correlation once https://github.com/open-telemetry/semantic-conventions/issues/1656 is implemented
note: |
This metric aligns with the `currentReplicas` field of the
[K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling)
Expand All @@ -301,7 +297,6 @@ groups:
metric_name: k8s.hpa.max_pods
stability: experimental
brief: "The upper limit for the number of replica pods to which the autoscaler can scale up"
# TODO: Add note for resource correlation once https://github.com/open-telemetry/semantic-conventions/issues/1656 is implemented
note: |
This metric aligns with the `maxReplicas` field of the
[K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling)
Expand All @@ -315,7 +310,6 @@ groups:
metric_name: k8s.hpa.min_pods
stability: experimental
brief: "The lower limit for the number of replica pods to which the autoscaler can scale down"
# TODO: Add note for resource correlation once https://github.com/open-telemetry/semantic-conventions/issues/1656 is implemented
note: |
This metric aligns with the `minReplicas` field of the
[K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling)
Expand Down
5 changes: 5 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/next
versions:
next:
metrics:
changes:
- rename_metrics:
k8s.replication_controller.desired_pods: k8s.replicationcontroller.desired_pods
k8s.replication_controller.available_pods: k8s.replicationcontroller.available_pods
1.30.0:
all:
changes:
Expand Down
Loading