Skip to content

Commit

Permalink
[resource/host] Add semantic convention for IP addresses of a host (#203
Browse files Browse the repository at this point in the history
)

Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
  • Loading branch information
mx-psi and AlexanderWert committed Oct 9, 2023
1 parent 5436da4 commit 0af7e0e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ release.
([#178](https://github.com/open-telemetry/semantic-conventions/pull/178))
- Improve HTTP metric briefs.
([#366](https://github.com/open-telemetry/semantic-conventions/pull/366))
- Add `host.ip` resource attribute convention.
([#203](https://github.com/open-telemetry/semantic-conventions/pull/203))

## v1.21.0 (2023-07-13)

Expand Down
3 changes: 3 additions & 0 deletions docs/resource/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ To report host metrics, the `system.*` namespace SHOULD be used.
| `host.image.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | Recommended |
| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`; `CentOS-8-x86_64-1905` | Recommended |
| `host.image.version` | string | The version string of the VM image or host OS as defined in [Version Attributes](README.md#version-attributes). | `0.1` | Recommended |
| `host.ip` | string[] | Available IP addresses of the host, excluding loopback interfaces. [1] | `[192.168.1.140, fe80::abc2:4a28:737a:609e]` | Opt-In |
| `host.name` | string | Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. | `opentelemetry-test` | Recommended |
| `host.type` | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` | Recommended |

**[1]:** IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.

`host.arch` 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.

| Value | Description |
Expand Down
10 changes: 10 additions & 0 deletions model/resource/host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ groups:
The version string of the VM image or host OS as defined in
[Version Attributes](README.md#version-attributes).
examples: ['0.1']
- id: ip
type: string[]
requirement_level: opt_in
brief: >
Available IP addresses of the host, excluding loopback interfaces.
note: >
IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses
MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
examples: ["192.168.1.140", "fe80::abc2:4a28:737a:609e"]

- id: host.cpu
prefix: host.cpu
type: resource
Expand Down

0 comments on commit 0af7e0e

Please sign in to comment.