From 75186f63b5f7cdbc6e71fb0ef544a9a3a71ffd1a Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Mon, 24 Aug 2020 13:14:37 -0400 Subject: [PATCH] Require that names and namespaces are one global space across all semantic convention areas (#832) * Require that names and namespaces are one global space across all semantic convention areas We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected). It was not clear if the attribute names across all convention areas should be globally unique. This commit asserts that conventions are one space, they are not independent spaces with their own namespaces each. We prohibit using the same Span or Resource attribute name or metric label name but give them slightly different meanings or value sets. Resolves: https://github.com/open-telemetry/opentelemetry-specification/issues/815 * Address PR comments Co-authored-by: Bogdan Drutu --- specification/common/common.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/common/common.md b/specification/common/common.md index f6a917b4cf..44f5ccf2f5 100644 --- a/specification/common/common.md +++ b/specification/common/common.md @@ -91,6 +91,15 @@ Names SHOULD follow these rules: - When a new namespace is necessary consider whether it should be a top-level namespace (e.g. `service`) or a nested namespace (e.g. `service.instance`). +- Semantic conventions exist for four areas: for Resource, Span and Log + attribute names as well as Metric label keys. In addition, for spans we have + two more areas: Event and Link attribute names. Identical namespaces or names + in all these areas MUST have identical meanings. For example the `http.method` + span attribute name denotes exactly the same concept as the `http.method` + metric label, has the same data type and the same set of possible values (in + both cases it records the value of the HTTP protocol's request method as a + string). + - Semantic conventions MUST limit names to printable Basic Latin characters (more precisely to [U+0021 .. U+007E](https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)#Table_of_characters)