Skip to content

Commit

Permalink
Merge branch 'master' into additional-general-sem-conventions-open-te…
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandrutu authored Jan 16, 2020
2 parents 754f3a6 + ec956a1 commit 704f30e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 16 additions & 1 deletion specification/api-metrics.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Metrics API

TODO: Table of contents
<details>
<summary>
Table of Contents
</summary>

* [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)

</details>

## Overview

Expand Down
2 changes: 2 additions & 0 deletions specification/data-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <https://github.com/open-telemetry/opentelemetry-python/pull/148>).
It is thus preferred to supply the raw data that *is* available.
Expand Down
24 changes: 14 additions & 10 deletions specification/data-resource-semantic-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -40,6 +41,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 |

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 All @@ -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. <br/> 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

Expand Down Expand Up @@ -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.<br/> 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 `:`.
2 changes: 1 addition & 1 deletion specification/library-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_)

Expand Down

0 comments on commit 704f30e

Please sign in to comment.