diff --git a/specification/common/attribute-naming.md b/specification/common/attribute-naming.md index 1cf593b9f73..80469fe82f9 100644 --- a/specification/common/attribute-naming.md +++ b/specification/common/attribute-naming.md @@ -8,6 +8,7 @@ - [Name Pluralization guidelines](#name-pluralization-guidelines) +- [Name Reuse Prohibition](#name-reuse-prohibition) - [Recommendations for OpenTelemetry Authors](#recommendations-for-opentelemetry-authors) - [Recommendations for Application Developers](#recommendations-for-application-developers) - [otel.* Namespace](#otel-namespace) @@ -67,6 +68,16 @@ Names SHOULD follow these rules: [Metric Name Pluralization Guidelines](../metrics/semantic_conventions/README.md#pluralization) SHOULD be followed for the attribute name. +## Name Reuse Prohibition + +It is prohibited to introduce a new attribute with a name that matches a name of +an attribute that existed in the past but was renamed (with a corresponding +schema file). + +When introducing a new attribute name check all existing schema files to make +sure the name does not appear as a key of any "rename_attributes" section (keys +denote old attribute names in rename operations). + ## Recommendations for OpenTelemetry Authors - All names that are part of OpenTelemetry semantic conventions SHOULD be part diff --git a/specification/metrics/semantic_conventions/README.md b/specification/metrics/semantic_conventions/README.md index ca60e3b1d16..0fdcd877d80 100644 --- a/specification/metrics/semantic_conventions/README.md +++ b/specification/metrics/semantic_conventions/README.md @@ -7,6 +7,7 @@ - [General Guidelines](#general-guidelines) + * [Name Reuse Prohibition](#name-reuse-prohibition) * [Units](#units) * [Pluralization](#pluralization) - [General Metric Semantic Conventions](#general-metric-semantic-conventions) @@ -66,6 +67,16 @@ and confusion for end users. (For example, prefer `process.runtime.java.gc*` ove `process.runtime.gc.*`.) Measures of many operating system metrics are similarly ambiguous. +### Name Reuse Prohibition + +It is prohibited to introduce a new metric with a name that matches a name of +a metric that existed in the past but was renamed (with a corresponding +schema file). + +When introducing a new metric name check all existing schema files to make sure +the name does not appear as a key of any "rename_metrics" section (keys denote +old metric names in rename operations). + ### Units Conventional metrics or metrics that have their units included in diff --git a/specification/trace/semantic_conventions/README.md b/specification/trace/semantic_conventions/README.md index dae734a96aa..bfc9fe2f72b 100644 --- a/specification/trace/semantic_conventions/README.md +++ b/specification/trace/semantic_conventions/README.md @@ -31,3 +31,13 @@ The following library-specific semantic conventions are defined: Apart from semantic conventions for traces and [metrics](../../metrics/semantic_conventions/README.md), OpenTelemetry also defines the concept of overarching [Resources](../../resource/sdk.md) with their own [Resource Semantic Conventions](../../resource/semantic_conventions/README.md). + +## Event Name Reuse Prohibition + +It is prohibited to introduce a new event with a name that matches a name of an +event that existed in the past but was renamed (with a corresponding schema +file). + +When introducing a new event name check all existing schema files to make sure +the name does not appear as a key of any "rename_events" section (keys denote +old event names in rename operations).