Skip to content

Commit

Permalink
add note about container metrics and usage's brief
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Jun 12, 2024
1 parent eaabcfe commit 05df82b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions docs/system/container-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ linkTitle: Container

## Container Metrics

This document describes instruments and attributes for common container level
metrics in OpenTelemetry. Collected from technology-specific,
well-defined APIs (e.g. Kubelet's API or container runtimes).

### Metric: `container.cpu.time`

This metric is [opt-in][MetricOptIn].
Expand Down Expand Up @@ -42,7 +46,7 @@ This metric is [opt-in][MetricOptIn].

| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`container.cpu.state`](/docs/attributes-registry/container.md) | string | The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `user`; `kernel` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`container.cpu.state`](/docs/attributes-registry/container.md) | string | The CPU state for this data point. A container's cpu time SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `user`; `kernel` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`container.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Expand Down Expand Up @@ -72,7 +76,7 @@ This metric is [opt-in][MetricOptIn].

| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `container.cpu.usage` | Gauge | `{cpu}` | CPU usage [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `container.cpu.usage` | Gauge | `{cpu}` | Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable cpus [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |


**[1]:** CPU usage of the specific container on all available CPU cores, averaged over the sample window
Expand All @@ -93,7 +97,7 @@ This metric is [opt-in][MetricOptIn].

| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`container.cpu.state`](/docs/attributes-registry/container.md) | string | The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `user`; `kernel` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`container.cpu.state`](/docs/attributes-registry/container.md) | string | The CPU state for this data point. A container's cpu time SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. | `user`; `kernel` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`container.cpu.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Expand Down
6 changes: 3 additions & 3 deletions model/metrics/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ groups:
unit: "s"
attributes:
- ref: container.cpu.state
brief: "The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels."
brief: "The CPU state for this data point. A container's cpu time SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels."
requirement_level: opt_in

- id: metric.container.cpu.usage
type: metric
metric_name: container.cpu.usage
stability: experimental
brief: "CPU usage"
brief: "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable cpus"
note: >
CPU usage of the specific container on all available CPU cores, averaged over the sample window
instrument: gauge
unit: "{cpu}"
attributes:
- ref: container.cpu.state
brief: "The CPU state for this data point. A container SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels."
brief: "The CPU state for this data point. A container's cpu usage SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels."
requirement_level: opt_in

# container.memory.* metrics and attribute group
Expand Down

0 comments on commit 05df82b

Please sign in to comment.