From 6fe2c0c9a9d29439ee799cdaf8864b94e582ab7f Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Mon, 6 Jan 2020 16:13:49 -0500 Subject: [PATCH 1/5] Add a reference to OTEPs process (#401) * Add a reference to OTEPs process Signed-off-by: Yuri Shkuro * Separate substantive from small changes Signed-off-by: Yuri Shkuro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7be23b89f6..d7487f64423 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![OpenTelemetry Logo](https://opentelemetry.io/img/logos/opentelemetry-horizontal-color.png) -The OpenTelemetry specification describes the cross-language requirements and expectations for all OpenTelemetry implementations. +The OpenTelemetry specification describes the cross-language requirements and expectations for all OpenTelemetry implementations. Substantive changes to the specification must be proposed using the [OpenTelemetry Enhancement Proposal](https://github.com/open-telemetry/oteps) process. Small changes, such as clarifications, wording changes, spelling/grammar corrections, etc. can be made directly via pull requests. ## Table of Contents From cff73d3373b5e8204bf072b18e793eee00d7d036 Mon Sep 17 00:00:00 2001 From: Kevin Brockhoff Date: Mon, 6 Jan 2020 16:17:05 -0600 Subject: [PATCH 2/5] Add service version to Resource attributes (#394) * defined service version attribute * clarify version attributes specification to be consistent with oteps/0038 * fix lint error Co-authored-by: Bogdan Drutu Co-authored-by: Yuri Shkuro --- .../data-resource-semantic-conventions.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/specification/data-resource-semantic-conventions.md b/specification/data-resource-semantic-conventions.md index db29daa0f02..082b91a997e 100644 --- a/specification/data-resource-semantic-conventions.md +++ b/specification/data-resource-semantic-conventions.md @@ -14,6 +14,7 @@ This document defines standard attributes for resources. These attributes are ty * [Environment](#environment) * [Cloud](#cloud) * [Cluster](#cluster) +* [Version Attributes](#version-attributes) ## TODOs @@ -40,6 +41,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 | 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): @@ -65,16 +67,7 @@ service.name = Shop.shoppingcart |---|---|---|---| | library.name | The name of the telemetry library. | `opentelemetry` | No | | library.language | The language of telemetry library and of the code instrumented with it.
The following spelling SHOULD be used for language strings: "cpp", "dotnet", "erlang", "go", "java", "nodejs", "php", "python", "ruby", "webjs" | `java` | No | -| library.version | The version string of the library as defined below. | `semver:1.2.3` | No | - -`library.version` is a `string`, with naming schemas hinting at the type of a version, -as follows: - -- `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 `:`. +| library.version | The version string of the library as defined in [Version Attributes](#version-attributes). | `semver:1.2.3` | No | ## Compute Unit @@ -142,3 +135,14 @@ Attributes defining a running environment (e.g. Cloud, Data Center). | cloud.account.id | The cloud account id used to identify different entities. | `opentelemetry` | | cloud.region | A specific geographical location where different entities can run | `us-central1` | | cloud.zone | Zones are a sub set of the region connected through low-latency links.
In aws it is called availability-zone. | `us-central1-a` | + +## 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 `:`. From 8da573bf85ed1a7ff0fbf0998ed45b4738416aa8 Mon Sep 17 00:00:00 2001 From: Sungwoo Kim Date: Sat, 11 Jan 2020 03:08:38 +0900 Subject: [PATCH 3/5] Fixed typo for sdk/trace description (#404) --- specification/library-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/library-layout.md b/specification/library-layout.md index 3267f3369ab..1f609996bdd 100644 --- a/specification/library-layout.md +++ b/specification/library-layout.md @@ -97,7 +97,7 @@ and container name. ### [/sdk/trace](sdk-tracing.md) -This directory describes the SDK implementation for api/metrics. +This directory describes the SDK implementation for api/trace. ### `/sdk/internal` (_Optional_) From 8aefab330af2a182cff864f65e88808845a2bf6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez?= Date: Sat, 11 Jan 2020 17:18:40 +0100 Subject: [PATCH 4/5] Add table of contents in api-metrics.md (#402) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel González Lopes Co-authored-by: Bogdan Drutu --- specification/api-metrics.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/specification/api-metrics.md b/specification/api-metrics.md index e1368b9c5e0..b7c217a94e3 100644 --- a/specification/api-metrics.md +++ b/specification/api-metrics.md @@ -1,6 +1,21 @@ # Metrics API -TODO: Table of contents +
+ +Table of Contents + + +* [Overview](#overview) + * [User-facing API](#user-facing-api) + * [Meter API](#meter-api) + * [Purpose of this document](#purpose-of-this-document) +* [Metric kinds and inputs](#metric-kinds-and-inputs) + * [Metric selection](#metric-selection) + * [Counter](#counter) + * [Gauge](#gauge) + * [Measure](#measure) + +
## Overview From ec956a139ea9aa0b585c1e67cc302f6b62cc0b0b Mon Sep 17 00:00:00 2001 From: Kevin Brockhoff Date: Wed, 15 Jan 2020 18:26:08 -0600 Subject: [PATCH 5/5] Define HTTP User-Agent attribute (#393) * add user_agent attribute * changed to value of user-agent header only * Add missing link brackets to make consistent with rest of document Co-Authored-By: Sergey Kanzhelev Co-authored-by: Sergey Kanzhelev Co-authored-by: Bogdan Drutu --- specification/data-http.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/data-http.md b/specification/data-http.md index 84de73c4a89..e3f3bc72d22 100644 --- a/specification/data-http.md +++ b/specification/data-http.md @@ -176,10 +176,12 @@ If the route cannot be determined, the `name` attribute MUST be set as defined i | `http.server_name` | The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). | [1] | | `http.route` | The matched route (path template). (TODO: Define whether to prepend application root) E.g. `"/users/:userID?"`. | No | | `http.client_ip` | The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For][]). Note that this is not necessarily the same as `net.peer.ip`, which would identify the network-level peer, which may be a proxy. | No | +| `http.user_agent` | Value of the HTTP [User-Agent][] header sent by the client. | No | [HTTP request line]: https://tools.ietf.org/html/rfc7230#section-3.1.1 [HTTP host header]: https://tools.ietf.org/html/rfc7230#section-5.4 [X-Forwarded-For]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For +[User-Agent]: https://tools.ietf.org/html/rfc7231#section-5.5.3 **[1]**: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. ). It is thus preferred to supply the raw data that *is* available.