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

[chore] fix pod and container metadata to include parent and units #23795

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
18 changes: 10 additions & 8 deletions receiver/k8sclusterreceiver/internal/container/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# k8s/container

**Parent Component:** k8s_cluster

## Default Metrics

The following metrics are emitted by default. Each of them can be disabled by applying the following configuration:
Expand All @@ -18,47 +20,47 @@ Maximum resource limit set for the container. See https://kubernetes.io/docs/ref

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Double |
| {cpu} | Gauge | Double |

### k8s.container.cpu_request

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Double |
| {cpu} | Gauge | Double |

### k8s.container.ephemeralstorage_limit

Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

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

### k8s.container.ephemeralstorage_request

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

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

### k8s.container.memory_limit

Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

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

### k8s.container.memory_request

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

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

### k8s.container.ready

Expand All @@ -82,15 +84,15 @@ Maximum resource limit set for the container. See https://kubernetes.io/docs/ref

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

### k8s.container.storage_request

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Int |
| By | 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.

10 changes: 10 additions & 0 deletions receiver/k8sclusterreceiver/internal/container/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ type: k8s/container

sem_conv_version: 1.18.0

parent: k8s_cluster

resource_attributes:
container.id:
description: The container id.
Expand Down Expand Up @@ -52,41 +54,49 @@ metrics:
k8s.container.cpu_request:
enabled: true
description: Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "{cpu}"
gauge:
value_type: double
k8s.container.cpu_limit:
enabled: true
description: Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "{cpu}"
gauge:
value_type: double
k8s.container.memory_request:
enabled: true
description: Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "By"
gauge:
value_type: int
k8s.container.memory_limit:
enabled: true
description: Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "By"
gauge:
value_type: int
k8s.container.storage_request:
enabled: true
description: Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "By"
gauge:
value_type: int
k8s.container.storage_limit:
enabled: true
description: Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "By"
gauge:
value_type: int
k8s.container.ephemeralstorage_request:
enabled: true
description: Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "By"
gauge:
value_type: int
k8s.container.ephemeralstorage_limit:
enabled: true
description: Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
unit: "By"
gauge:
value_type: int
k8s.container.restarts:
Expand Down
2 changes: 2 additions & 0 deletions receiver/k8sclusterreceiver/internal/pod/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# k8s/pod

**Parent Component:** k8s_cluster

## Default Metrics

The following metrics are emitted by default. Each of them can be disabled by applying the following configuration:
Expand Down
2 changes: 2 additions & 0 deletions receiver/k8sclusterreceiver/internal/pod/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ type: k8s/pod

sem_conv_version: 1.18.0

parent: k8s_cluster

resource_attributes:
k8s.namespace.name:
description: The k8s namespace name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ resourceMetrics:
dataPoints:
- asDouble: 10
name: k8s.container.cpu_request
unit: "{cpu}"
- description: Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
gauge:
dataPoints:
- asDouble: 20
name: k8s.container.cpu_limit
unit: "{cpu}"
scope:
name: otelcol/k8sclusterreceiver
version: latest
Loading