From 1268268f4c49db7dd7a21aa7890897fd73015395 Mon Sep 17 00:00:00 2001 From: Jaana Dogan Date: Mon, 22 Mar 2021 11:50:51 -0700 Subject: [PATCH] Mention that semantic conventions should be autogenerated (#1515) * Mention that semantic conventions should be autogenerated Adding a section to semantic conventions to capture the implementation requirementes from the languages. This is a follow up from the spec SIG model where we discussed we should ask each langauge to autogenerate the semantic conventions keys from the YAML files. * Add to CHANGELOG * Fix CHANGELOG * Fix the link * markdownlint * Address feedback * Address feedback * Fix typ * Update overview.md Co-authored-by: Sergey Kanzhelev Co-authored-by: Carlos Alberto Cortez --- CHANGELOG.md | 2 ++ specification/overview.md | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c68326c12b..02255ee2d20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,8 @@ Google products under `cloud.infrastructure_service` ([#1496](https://github.com - `http.url` MUST NOT contain credentials ([#1502](https://github.com/open-telemetry/opentelemetry-specification/pull/1502)) - Add `aws.eks.cluster.arn` to EKS specific semantic conventions ([#1484](https://github.com/open-telemetry/opentelemetry-specification/pull/1484)) - Rename `zone` to `availability_zone` in `cloud` semantic conventions ([#1495](https://github.com/open-telemetry/opentelemetry-specification/pull/1495)) +- Add section describing that libraries and the collector should autogenerate +the semantic convention keys. ([#1515](https://github.com/open-telemetry/opentelemetry-specification/pull/1515)) ## v1.0.1 (2021-02-11) diff --git a/specification/overview.md b/specification/overview.md index 827c0d77cb4..a188a09ef94 100644 --- a/specification/overview.md +++ b/specification/overview.md @@ -75,6 +75,15 @@ The **Semantic Conventions** define the keys and values which describe commonly * [Span Conventions](trace/semantic_conventions/README.md) * [Metrics Conventions](metrics/semantic_conventions/README.md) +Both the collector and the client libraries SHOULD autogenerate semantic +convention keys and enum values into constants (or language idomatic +equivalent). Generated values shouldn't be distributed in stable packages +until semantic conventions are stable. +The [YAML](../semantic_conventions/README.md) files MUST be used as the +source of truth for generation. Each language implementation SHOULD +provide language-specific support to the +[code generator](https://github.com/open-telemetry/build-tools/tree/main/semantic-conventions#code-generator). + ### Contrib Packages The OpenTelemetry project maintains integrations with popular OSS projects which have been identified as important for observing modern web services.