Skip to content

Commit

Permalink
Set command attributes as conditionally required
Browse files Browse the repository at this point in the history
  • Loading branch information
marcsanmi committed May 26, 2023
1 parent dff7705 commit ac909d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 7 additions & 3 deletions semantic_conventions/resource/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,25 @@ groups:
type: string
brief: >
The ID of the container image. Usually a hash algorithm followed by a UUID. The UUID might be abbreviated.
examples: ['sha256:f90d814248a0']
examples: ['sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f']
- id: command
type: string
requirement_level:
conditionally_required: If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
brief: >
The command used to run the container (i.e. the command name).
examples: [ 'otelcontribcol' ]
- id: command_line
type: string
requirement_level:
conditionally_required: [1]
brief: >
The full command run by the container as a single string representing the full command.
It is recommended to remove embedded credentials or sensitive data to prevent potential leakage.
examples: [ 'otelcontribcol --config config.yaml' ]
- id: command_args
type: string[]
requirement_level:
conditionally_required: [1]
brief: >
All the command arguments (including the command/executable itself) run by the container.
It is recommended to remove embedded credentials or sensitive data to prevent potential leakage.
examples: [ 'otelcontribcol, --config, config.yaml' ]
14 changes: 7 additions & 7 deletions specification/resource/semantic_conventions/container.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Container

**Status**: [Experimental][DocumentStatus]
**Status**: [Experimental](../../document-status.md)

**type:** `container`

Expand All @@ -14,10 +14,10 @@
| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` | Recommended |
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | Recommended |
| `container.image.tag` | string | Container image tag. | `0.1` | Recommended |
| `container.image.id` | string | The ID of the container image. Usually a hash algorithm followed by a UUID. The UUID might be abbreviated. | `sha256:f90d814248a0` | Recommended |
| `container.command` | string | The command used to run the container (i.e. the command name). | `otelcontribcol` | Recommended |
| `container.command_line` | string | The full command run by the container as a single string representing the full command. It is recommended to remove embedded credentials or sensitive data to prevent potential leakage. | `otelcontribcol --config config.yaml` | Recommended |
| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. It is recommended to remove embedded credentials or sensitive data to prevent potential leakage. | `[otelcontribcol, --config, config.yaml]` | Recommended |
<!-- endsemconv -->
| `container.image.id` | string | The ID of the container image. Usually a hash algorithm followed by a UUID. The UUID might be abbreviated. | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | Recommended |
| `container.command` | string | The command used to run the container (i.e. the command name). | `otelcontribcol` | Conditionally Required: [1] |
| `container.command_line` | string | The full command run by the container as a single string representing the full command. | `otelcontribcol --config config.yaml` | Conditionally Required: [1] |
| `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. | `[otelcontribcol, --config, config.yaml]` | Conditionally Required: [1] |

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/document-status.md
**[1]:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
<!-- endsemconv -->

0 comments on commit ac909d7

Please sign in to comment.