From 9b449af77e62b80c88e7d521fe9fcca056883ace Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 26 Aug 2020 10:49:52 +0900 Subject: [PATCH] Remove version convention / semver prefix from versions. (#873) * Remove version convention / semver prefix from versions. * Moar * api.md * Examples of version strings. * Apply suggestions from code review Co-authored-by: Armin Ruech * spaec Co-authored-by: Armin Ruech Co-authored-by: Carlos Alberto Cortez Co-authored-by: Bogdan Drutu --- .../resource/semantic_conventions/README.md | 21 +++++++------------ .../resource/semantic_conventions/faas.md | 2 +- .../resource/semantic_conventions/host.md | 2 +- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index dcea48078..6eadcb4cf 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -14,7 +14,7 @@ This document defines standard attributes for resources. These attributes are ty - [Compute Unit](#compute-unit) - [Compute Instance](#compute-instance) - [Environment](#environment) -- [Version Attributes](#version-attributes) +- [Version attributes](#version-attributes) @@ -43,7 +43,7 @@ Certain attribute groups in this document have a **Required** column. For these | service.name | Logical name of the service.
MUST be the same for all instances of horizontally scaled services. | `shoppingcart` | Yes | | service.namespace | A namespace for `service.name`.
A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. The field is optional. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. | `Shop` | No | | service.instance.id | The string ID of the service instance.
MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). | `627cc493-f310-47de-96bd-71410b7dec09` | Yes | -| service.version | The version string of the service API or implementation as defined in [Version Attributes](#version-attributes). | `semver:2.0.0` | No | +| service.version | The version string of the service API or implementation. | `2.0.0` | No | Note: `service.namespace` and `service.name` are not intended to be concatenated for the purpose of forming a single globally unique name for the service. For example the following 2 sets of attributes actually describe 2 different services (despite the fact that the concatenation would result in the same string): @@ -78,8 +78,8 @@ The identifier SHOULD be stable across different versions of an implementation. |---|---|---|---| | telemetry.sdk.name | The name of the telemetry SDK as defined above. | `opentelemetry` | No | | telemetry.sdk.language | The language of the telemetry SDK.
One of the following values MUST be used, if one applies: "cpp", "dotnet", "erlang", "go", "java", "nodejs", "php", "python", "ruby", "webjs" | `java` | No | -| telemetry.sdk.version | The version string of the telemetry SDK as defined in [Version Attributes](#version-attributes). | `semver:1.2.3` | No | -| telemetry.auto.version | The version string of the auto instrumentation agent, if used, as defined in [Version Attributes](#version-attributes). | `semver:1.2.3` | No | +| telemetry.sdk.version | The version string of the telemetry SDK. | `1.2.3` | No | +| telemetry.auto.version | The version string of the auto instrumentation agent, if used. | `1.2.3` | No | ## Compute Unit @@ -105,13 +105,8 @@ Attributes defining a running environment (e.g. Operating System, Cloud, Data Ce - [Environment](./deployment_environment.md) - [Kubernetes](./k8s.md) -## Version Attributes +## Version attributes -Version attributes such as `service.version` and `library.version` are values of type `string`, -with naming schemas hinting at the type of a version, such as the following: - -- `semver:1.2.3` (a semantic version) -- `git:8ae73a` (a git sha hash) -- `0.0.4.2.20190921` (a untyped version) - -The type and version value MUST be separated by a colon character `:`. +Version attributes, such as `service.version`, are values of type `string`. They are +the exact version used to identify an artifact. This may be a semantic version, e.g., `1.2.3`, git hash, e.g., +`8ae73a`, or an arbitrary version string, e.g., `0.1.2.20210101`, whatever was used when building the artifact. diff --git a/specification/resource/semantic_conventions/faas.md b/specification/resource/semantic_conventions/faas.md index ded443849..6c0de741b 100644 --- a/specification/resource/semantic_conventions/faas.md +++ b/specification/resource/semantic_conventions/faas.md @@ -8,7 +8,7 @@ |---|---|---|--| | faas.name | The name of the function being executed. | `my-function` | Yes | | faas.id | The unique name of the function being executed.
For example, in AWS Lambda this field corresponds to the [ARN] value, in GCP to the URI of the resource, and in Azure to the [FunctionDirectory] field. | `arn:aws:lambda:us-west-2:123456789012:function:my-function` | Yes | -| faas.version | The version string of the function being executed as defined in [Version Attributes](./README.md#version-attributes) | `semver:2.0.0` | No | +| faas.version | The version string of the function being executed. | `2.0.0` | No | | faas.instance | The execution environment ID as a string. | `my-function:instance-0001` | No | Note: The resource attribute `faas.instance` differs from the span attribute `faas.execution`. For more information see the [Semantic conventions for FaaS spans](../../trace/semantic_conventions/faas.md#difference-between-execution-and-instance). diff --git a/specification/resource/semantic_conventions/host.md b/specification/resource/semantic_conventions/host.md index 7045de7f2..bb68217d5 100644 --- a/specification/resource/semantic_conventions/host.md +++ b/specification/resource/semantic_conventions/host.md @@ -11,4 +11,4 @@ | host.type | Type of host.
For Cloud this must be the machine type.| `n1-standard-1` | | host.image.name | 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.id | VM image id. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | -| host.image.version | The version string of the VM image as defined in [Version Attributes](./README.md#version-attributes). | `0.1` | +| host.image.version | The version string of the VM image. | `0.1` |