Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version convention / semver prefix from versions. #873

Merged
merged 8 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Updates:
([#610](https://github.com/open-telemetry/opentelemetry-specification/pull/610))
- Rename ProbabilitySampler to TraceIdRatioBasedSampler and add requirements
([#611](https://github.com/open-telemetry/opentelemetry-specification/pull/611))
- Version attributes no longer have a prefix such as semver:
([#873](https://github.com/open-telemetry/opentelemetry-specification/pull/873))

## v0.6.0 (07-01-2020)

Expand Down
2 changes: 1 addition & 1 deletion specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ Example 1
},
"Resource": {
"service.name": "donut_shop",
"service.version": "semver:2.0.0",
"service.version": "2.0.0",
"k8s.pod.uid": "1138528c-c36e-11e9-a1a7-42010a800198",
},
"TraceId": "f4dbb3edd765f620", // this is a byte sequence
Expand Down
2 changes: 1 addition & 1 deletion specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ arguments:
In case an invalid name (null or empty string) is specified, a working default `Meter` implementation is returned as a fallback
rather than returning null or throwing an exception.
A `MeterProvider` could also return a no-op `Meter` here if application owners configure the SDK to suppress telemetry produced by this library.
- `version` (optional): Specifies the version of the instrumentation library (e.g. `semver:1.0.0`).
- `version` (optional): Specifies the version of the instrumentation library (e.g. `1.0.0`).

Each distinctly named `Meter` establishes a separate namespace for its
metric instruments, making it possible for multiple instrumentation
Expand Down
21 changes: 8 additions & 13 deletions specification/resource/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
anuraaga marked this conversation as resolved.
Show resolved Hide resolved
- [Version Attributes](#version-attributes)
- [Version attributes](#version-attributes)

<!-- tocstop -->

Expand Down Expand Up @@ -43,7 +43,7 @@ Certain attribute groups in this document have a **Required** column. For these
| service.name | Logical name of the service. <br/> MUST be the same for all instances of horizontally scaled services. | `shoppingcart` | Yes |
| service.namespace | A namespace for `service.name`.<br/>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. <br/>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):

Expand Down Expand Up @@ -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.<br/> 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

Expand All @@ -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.
2 changes: 1 addition & 1 deletion specification/resource/semantic_conventions/faas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br /> 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).
Expand Down
2 changes: 1 addition & 1 deletion specification/resource/semantic_conventions/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
| host.type | Type of host.<br/> 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` |
3 changes: 1 addition & 2 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ That API MUST accept the following parameters:
functionality (e.g. an implementation which is not even observability-related).
A TracerProvider could also return a no-op Tracer here if application owners configure
the SDK to suppress telemetry produced by this library.
- `version` (optional): Specifies the [version](../resource/semantic_conventions/README.md#version-attributes) of the instrumentation library
(e.g. `semver:1.0.0`).
- `version` (optional): Specifies the version of the instrumentation library (e.g. `1.0.0`).

It is unspecified whether or under which conditions the same or different
`Tracer` instances are returned from this functions.
Expand Down