diff --git a/CHANGELOG.md b/CHANGELOG.md index ad96a14a63..4ef24f9e60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,3 +92,6 @@ release. - Limit `http.request.method` values to a closed set of known values, introduce `http.request.method_original` for the original value. ([#17](https://github.com/open-telemetry/opentelemetry-specification/pull/17)) +- Mark service.version as stable. + ([#106](https://github.com/open-telemetry/semantic-conventions/pull/106)) + \ No newline at end of file diff --git a/semantic_conventions/resource/service.yaml b/semantic_conventions/resource/service.yaml index 3765345bac..e930b62194 100644 --- a/semantic_conventions/resource/service.yaml +++ b/semantic_conventions/resource/service.yaml @@ -16,3 +16,8 @@ groups: with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. examples: ["shoppingcart"] + - id: version + type: string + brief: > + The version string of the service API or implementation. The format is not defined by these conventions. + examples: ["2.0.0", "a01dbef8a"] diff --git a/semantic_conventions/resource/service_experimental.yaml b/semantic_conventions/resource/service_experimental.yaml index 4ad790d16a..43c869ee35 100644 --- a/semantic_conventions/resource/service_experimental.yaml +++ b/semantic_conventions/resource/service_experimental.yaml @@ -35,8 +35,3 @@ groups: (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). examples: ["my-k8s-pod-deployment-1", "627cc493-f310-47de-96bd-71410b7dec09"] - - id: version - type: string - brief: > - The version string of the service API or implementation. - examples: ["2.0.0"] diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index 2aad414014..4be3ec3868 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -55,6 +55,7 @@ These are the attributes which MAY be configurable via a dedicated environment v as specified in [OpenTelemetry Environment Variable Specification](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.21.0/specification/configuration/sdk-environment-variables.md): - [`service.name`](#service) +- [`service.version`](#service) ## Semantic Attributes with SDK-provided Default Value @@ -76,6 +77,7 @@ as specified in the [Resource SDK specification](https://github.com/open-telemet | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `service.name` | string | Logical name of the service. [1] | `shoppingcart` | Required | +| `service.version` | string | The version string of the service API or implementation. The format is not defined by these conventions. | `2.0.0`; `a01dbef8a` | Recommended | **[1]:** MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. @@ -93,7 +95,6 @@ as specified in the [Resource SDK specification](https://github.com/open-telemet |---|---|---|---|---| | `service.namespace` | string | A namespace for `service.name`. [1] | `Shop` | Recommended | | `service.instance.id` | string | The string ID of the service instance. [2] | `my-k8s-pod-deployment-1`; `627cc493-f310-47de-96bd-71410b7dec09` | Recommended | -| `service.version` | string | The version string of the service API or implementation. | `2.0.0` | Recommended | **[1]:** 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. 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.