-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch k8s.pod and k8s.container metrics to use pdata. (#23441)
Updates #4367
- Loading branch information
Showing
24 changed files
with
2,554 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# 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: Switch k8s.pod and k8s.container metrics to use pdata. | ||
|
||
# One or more tracking issues related to the change | ||
issues: [23441] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
//go:generate mdatagen metadata.yaml | ||
|
||
package container // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/internal/container" |
107 changes: 107 additions & 0 deletions
107
receiver/k8sclusterreceiver/internal/container/documentation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) | ||
|
||
# k8s/container | ||
|
||
## Default Metrics | ||
|
||
The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: | ||
|
||
```yaml | ||
metrics: | ||
<metric_name>: | ||
enabled: false | ||
``` | ||
### k8s.container.cpu_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 | 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 | | ||
### 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 | | ||
### 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 | | ||
### 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 | | ||
### 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 | | ||
### k8s.container.ready | ||
Whether a container has passed its readiness probe (0 for no, 1 for yes) | ||
| Unit | Metric Type | Value Type | | ||
| ---- | ----------- | ---------- | | ||
| 1 | Gauge | Int | | ||
### k8s.container.restarts | ||
How many times the container has restarted in the recent past. This value is pulled directly from the K8s API and the value can go indefinitely high and be reset to 0 at any time depending on how your kubelet is configured to prune dead containers. It is best to not depend too much on the exact value but rather look at it as either == 0, in which case you can conclude there were no restarts in the recent past, or > 0, in which case you can conclude there were restarts in the recent past, and not try and analyze the value beyond that. | ||
| Unit | Metric Type | Value Type | | ||
| ---- | ----------- | ---------- | | ||
| 1 | Gauge | Int | | ||
### k8s.container.storage_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 | | ||
### 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 | | ||
## Resource Attributes | ||
| Name | Description | Values | Enabled | | ||
| ---- | ----------- | ------ | ------- | | ||
| container.id | The container id. | Any Str | true | | ||
| container.image.name | The container image name | Any Str | true | | ||
| container.image.tag | The container image tag | Any Str | true | | ||
| k8s.container.name | The k8s container name | Any Str | true | | ||
| k8s.namespace.name | The k8s namespace name | Any Str | true | | ||
| k8s.node.name | The k8s node name | Any Str | true | | ||
| k8s.pod.name | The k8s pod name | Any Str | true | | ||
| k8s.pod.uid | The k8s pod uid | Any Str | true | | ||
| opencensus.resourcetype | The OpenCensus resource type. | Any Str | true | |
Oops, something went wrong.