Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[k8sclusterreceiver] refactor state metrics to use empty units #27091

Merged
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
27 changes: 27 additions & 0 deletions .chloggen/k8sclusterreceiver-empty-units.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

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

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: k8sclusterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "change k8s.container.ready, k8s.pod.phase, k8s.pod.status_reason, k8s.namespace.phase units to empty"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [10553]

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
8 changes: 4 additions & 4 deletions receiver/k8sclusterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Whether a container has passed its readiness probe (0 for no, 1 for yes)

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| | Gauge | Int |

### k8s.container.restarts

Expand Down Expand Up @@ -226,15 +226,15 @@ The current phase of namespaces (1 for active and 0 for terminating)

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| | Gauge | Int |

### k8s.pod.phase

Current phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown)

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| | Gauge | Int |

### k8s.replicaset.available

Expand Down Expand Up @@ -402,7 +402,7 @@ Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
| | Gauge | Int |

## Resource Attributes

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resourceMetrics:
dataPoints:
- asInt: "0"
name: k8s.namespace.phase
unit: "1"
unit: ""
scope:
name: otelcol/k8sclusterreceiver
version: latest
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resourceMetrics:
dataPoints:
- asInt: "3"
name: k8s.pod.phase
unit: "1"
unit: ""
scope:
name: otelcol/k8sclusterreceiver
version: latest
Expand Down Expand Up @@ -71,7 +71,7 @@ resourceMetrics:
dataPoints:
- asInt: "1"
name: k8s.container.ready
unit: "1"
unit: ""
- description: Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
gauge:
dataPoints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ resourceMetrics:
dataPoints:
- asInt: "4"
name: k8s.pod.phase
unit: "1"
unit: ""
- description: Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4 - Shutdown, 5 - UnexpectedAdmissionError, 6 - Unknown)
gauge:
dataPoints:
- asInt: "1"
name: k8s.pod.status_reason
unit: "1"
unit: ""
scope:
name: otelcol/k8sclusterreceiver
version: latest
Expand Down Expand Up @@ -77,7 +77,7 @@ resourceMetrics:
dataPoints:
- asInt: "1"
name: k8s.container.ready
unit: "1"
unit: ""
- description: Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
gauge:
dataPoints:
Expand Down
8 changes: 4 additions & 4 deletions receiver/k8sclusterreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,20 @@ metrics:
k8s.container.ready:
enabled: true
description: Whether a container has passed its readiness probe (0 for no, 1 for yes)
unit: 1
unit: ""
gauge:
value_type: int

k8s.pod.phase:
enabled: true
description: Current phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown)
unit: 1
unit: ""
gauge:
value_type: int
k8s.pod.status_reason:
enabled: false
description: Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4 - Shutdown, 5 - UnexpectedAdmissionError, 6 - Unknown)
unit: 1
unit: ""
gauge:
value_type: int

Expand Down Expand Up @@ -369,7 +369,7 @@ metrics:
k8s.namespace.phase:
enabled: true
description: The current phase of namespaces (1 for active and 0 for terminating)
unit: 1
unit: ""
gauge:
value_type: int

Expand Down
Loading