Skip to content

Commit

Permalink
Merge branch 'pod-annotations' of https://github.com/tokaplan/semanti…
Browse files Browse the repository at this point in the history
…c-conventions into pod-annotations
  • Loading branch information
tokaplan committed Nov 15, 2023
2 parents ef6bfb3 + 9628f3c commit c8bbeb9
Show file tree
Hide file tree
Showing 33 changed files with 842 additions and 320 deletions.
15 changes: 14 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,17 @@
/docs/mobile/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers
/model/logs/mobile* @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers

# TODO - Add semconv area experts
# K8s semantic conventions approvers
/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
/docs/attributes-registry/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
/model/resource/k8s.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
/model/registry/k8s.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers

# Container semantic conventions approvers
/docs/resource/container.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers
/docs/attributes-registry/container.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers
/docs/attributes-registry/oci.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers
/model/resource/container.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers
/model/registry/container.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers
/model/registry/oci.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@ release.

### Breaking

- Update `jvm.gc.duration` histogram buckets to `[ 0.01, 0.1, 1, 10 ]`
([#317](https://github.com/open-telemetry/semantic-conventions/pull/317))
- BREAKING: Change type of `host.cpu.model.id` and `host.cpu.model.family` to string.
([#495](https://github.com/open-telemetry/semantic-conventions/issues/495))

### Features

- Adds `labels` attribute to `k8s.pod` resource
([#494](https://github.com/open-telemetry/semantic-conventions/pull/494))

- Add `code.stacktrace` attribute
([#435](https://github.com/open-telemetry/semantic-conventions/pull/435))
- Add `http.flavor` and `http.user_agent` to list of deprecated attributes
([#503](https://github.com/open-telemetry/semantic-conventions/pull/503))
- Add Semantic conventions for TLS/SSL encrypted communication.
([#21](https://github.com/open-telemetry/semantic-conventions/pull/21))

### Fixes

Expand Down
6 changes: 6 additions & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ Currently, the following namespaces exist:
* [Code](code.md)
* [Container](container.md)
* [Destination](destination.md)
* [Device](device.md)
* [Error](error.md)
* [Host](host.md)
* [HTTP](http.md)
* [Network](network.md)
* [OCI](oci.md)
* [OS](os.md)
* [Process](process.md)
* [RPC](rpc.md)
* [Server](server.md)
* [Source](source.md)
* [Thread](thread.md)
* [TLS](tls.md)
* [URL](url.md)
* [User agent](user-agent.md)

Expand Down
23 changes: 23 additions & 0 deletions docs/attributes-registry/device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Device

## Device Attributes

<!-- semconv registry.device(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `device.id` | string | A unique identifier representing the device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` |
| `device.manufacturer` | string | The name of the device manufacturer [2] | `Apple`; `Samsung` |
| `device.model.identifier` | string | The model identifier for the device [3] | `iPhone3,4`; `SM-G920F` |
| `device.model.name` | string | The marketing name for the device model [4] | `iPhone 6s Plus`; `Samsung Galaxy S6` |

**[1]:** The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.

**[2]:** The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.

**[3]:** It's recommended this value represents a machine-readable version of the model identifier rather than the market or consumer-friendly name of the device.

**[4]:** It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.
<!-- endsemconv -->
34 changes: 34 additions & 0 deletions docs/attributes-registry/error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Error

## Error Attributes

<!-- semconv registry.error(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `error.type` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` |

**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
Instrumentations SHOULD document the list of errors they report.

The cardinality of `error.type` within one instrumentation library SHOULD be low.
Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
should be prepared for `error.type` to have high cardinality at query time when no
additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
it's RECOMMENDED to:

* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.

`error.type` 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 |
|---|---|
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. |
<!-- endsemconv -->
44 changes: 44 additions & 0 deletions docs/attributes-registry/host.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--- Hugo front matter used to generate the website version of this page:
--->
# Host

## Host Attributes

<!-- semconv registry.host(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `host.arch` | string | The CPU architecture the host system is running on. | `amd64` |
| `host.cpu.cache.l2.size` | int | The amount of level 2 memory cache available to the processor (in Bytes). | `12288000` |
| `host.cpu.family` | string | Family or generation of the CPU. | `6`; `PA-RISC 1.1e` |
| `host.cpu.model.id` | string | Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. | `6`; `9000/778/B180L` |
| `host.cpu.model.name` | string | Model designation of the processor. | `11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz` |
| `host.cpu.stepping` | int | Stepping or core revisions. | `1` |
| `host.cpu.vendor.id` | string | Processor manufacturer identifier. A maximum 12-character string. [1] | `GenuineIntel` |
| `host.id` | string | Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. | `fdbf79e8af94cb7f9e8df36789187052` |
| `host.image.id` | string | VM image ID or host OS image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` |
| `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` |
| `host.image.version` | string | The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). | `0.1` |
| `host.ip` | string[] | Available IP addresses of the host, excluding loopback interfaces. [2] | `[192.168.1.140, fe80::abc2:4a28:737a:609e]` |
| `host.mac` | string[] | Available MAC addresses of the host, excluding loopback interfaces. [3] | `[AC-DE-48-23-45-67, AC-DE-48-23-45-67-01-9F]` |
| `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` |
| `host.type` | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` |

**[1]:** [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string.

**[2]:** 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.

**[3]:** MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant.

`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 |
|---|---|
| `amd64` | AMD64 |
| `arm32` | ARM32 |
| `arm64` | ARM64 |
| `ia64` | Itanium |
| `ppc32` | 32-bit PowerPC |
| `ppc64` | 64-bit PowerPC |
| `s390x` | IBM z/Architecture |
| `x86` | 32-bit x86 |
<!-- endsemconv -->
13 changes: 13 additions & 0 deletions docs/attributes-registry/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,24 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
<!-- semconv attributes.http.deprecated(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `http.flavor` | string | Deprecated, use `network.protocol.name` instead. | `1.0` |
| `http.method` | string | Deprecated, use `http.request.method` instead. | `GET`; `POST`; `HEAD` |
| `http.request_content_length` | int | Deprecated, use `http.request.header.content-length` instead. | `3495` |
| `http.response_content_length` | int | Deprecated, use `http.response.header.content-length` instead. | `3495` |
| `http.scheme` | string | Deprecated, use `url.scheme` instead. | `http`; `https` |
| `http.status_code` | int | Deprecated, use `http.response.status_code` instead. | `200` |
| `http.target` | string | Deprecated, use `url.path` and `url.query` instead. | `/search?q=OpenTelemetry#SemConv` |
| `http.url` | string | Deprecated, use `url.full` instead. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` |
| `http.user_agent` | string | Deprecated, use `user_agent.original` instead. | `CERN-LineMode/2.15 libwww/2.17b3`; `Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1` |

`http.flavor` 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 |
|---|---|
| `1.0` | HTTP/1.0 |
| `1.1` | HTTP/1.1 |
| `2.0` | HTTP/2 |
| `3.0` | HTTP/3 |
| `SPDY` | SPDY protocol. |
| `QUIC` | QUIC protocol. |
<!-- endsemconv -->
2 changes: 1 addition & 1 deletion docs/attributes-registry/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
| `messaging.rocketmq.message.tag` | string | The secondary classifier of message besides topic. | `tagA` |
| `messaging.rocketmq.message.type` | string | Type of message. | `normal` |
| `messaging.rocketmq.namespace` | string | Namespace of RocketMQ resources, resources in different namespaces are individual. | `myNamespace` |
| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `rocketmq`; `activemq`; `AmazonSQS` |
| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `rocketmq`; `activemq` |

**[1]:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.

Expand Down
32 changes: 32 additions & 0 deletions docs/attributes-registry/os.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: OS
--->
# OS

## Operating System Attributes

<!-- semconv registry.os(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `os.build_id` | string | Unique identifier for a particular build or compilation of the operating system. | `TQ3C.230805.001.B2`; `20E247`; `22621` |
| `os.description` | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`; `Ubuntu 18.04.1 LTS` |
| `os.name` | string | Human readable operating system name. | `iOS`; `Android`; `Ubuntu` |
| `os.type` | string | The operating system type. | `windows` |
| `os.version` | string | The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). | `14.2.1`; `18.04.1` |

`os.type` 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 |
|---|---|
| `windows` | Microsoft Windows |
| `linux` | Linux |
| `darwin` | Apple Darwin |
| `freebsd` | FreeBSD |
| `netbsd` | NetBSD |
| `openbsd` | OpenBSD |
| `dragonflybsd` | DragonFly BSD |
| `hpux` | HP-UX (Hewlett Packard Unix) |
| `aix` | AIX (Advanced Interactive eXecutive) |
| `solaris` | SunOS, Oracle Solaris |
| `z_os` | IBM z/OS |
<!-- endsemconv -->
19 changes: 19 additions & 0 deletions docs/attributes-registry/process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Process

## Process Attributes

<!-- semconv registry.process(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `process.command` | string | The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` |
| `process.command_args` | string[] | All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. | `[cmd/otecol, --config=config.yaml]` |
| `process.command_line` | string | The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` |
| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` |
| `process.executable.path` | string | The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` |
| `process.owner` | string | The username of the user that owns the process. | `root` |
| `process.parent_pid` | int | Parent Process identifier (PID). | `111` |
| `process.pid` | int | Process identifier (PID). | `1234` |
<!-- endsemconv -->
Loading

0 comments on commit c8bbeb9

Please sign in to comment.