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

Proposal: Add a version semantic attribute #38

Merged
merged 12 commits into from
Oct 8, 2019
34 changes: 34 additions & 0 deletions text/0038-version-resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Version Semantic Attribute

**Status:** `approved`

Add a standard `version` semantic attribute.

## Motivation

When creating trace data or metrics, it can be extremely useful to know the specific version that
emitted the iota of span or measurement being viewed. However, versions can mean different things
to different systems and users. In addition, downstream analysis systems may wish to expose
functionality related to the type of a version (such as detecting when versions are newer or older).
To support this, we should standardize a `version` attribute with optional hints as to the type of the
version.

## Explanation

A `version` is a semantic attribute that can be applied to other resources, such as `Service`,
`Component`, `Library`, `Device`, `Platform`, etc. A `version` attribute is optional, but recommended.
The definition of a `version` is a key-value attribute pair of `string` to `string`, with naming schemas
available to hint at the type of a version, such as the following:

`version=semver:1.2.3` (a semantic version)
`version=git:8ae73a` (a git sha hash)
`version=0.0.4.2.20190921` (a untyped version)

## Internal details

Since this is just an attribute pair, no special handling is required, although SDKs may provide helper methods
to construct schema-appropriate values.

## Prior art and alternatives

Tagging service resources with their version is generally suggested by analysis tools -- see [JAEGER_TAGS](https://www.jaegertracing.io/docs/1.8/client-features/) for an example -- but lacks standardization.