Skip to content

Commit

Permalink
flatten registry
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Mar 21, 2024
1 parent bf9b78d commit 9f1a8f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
9 changes: 2 additions & 7 deletions docs/attributes-registry/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| `container.command` | string | The command used to run the container (i.e. the command name). [1] | `otelcontribcol` |
| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. [2] | `[otelcontribcol, --config, config.yaml]` |
| `container.command_line` | string | The full command run by the container as a single string representing the full command. [2] | `otelcontribcol --config config.yaml` |
| `container.cpu.state` | 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` |
| `container.id` | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` |
| `container.image.id` | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [2] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` |
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` |
Expand All @@ -27,12 +28,6 @@ K8s defines a link to the container registry repository with digest `"imageID":
The ID is assinged by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.

**[3]:** [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field.
<!-- endsemconv -->

<!-- semconv registry.container.cpu(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `container.cpu.state` | 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` |

`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 All @@ -41,4 +36,4 @@ The ID is assinged by the container runtime and can vary in different environmen
| `user` | When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows). |
| `system` | When CPU is used by the system (host OS) |
| `kernel` | When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows). |
<!-- endsemconv -->
<!-- endsemconv -->
7 changes: 1 addition & 6 deletions model/registry/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ groups:
brief: >
Container labels, `<key>` being the label name, the value being the label value.
examples: [ 'container.label.app=nginx' ]
- id: registry.container.cpu
prefix: container.cpu
type: attribute_group
brief: "Describes Container CPU metric attributes"
attributes:
- id: state
- id: 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."
type:
allow_custom_values: true
Expand Down

0 comments on commit 9f1a8f0

Please sign in to comment.