From c32afbc91490a45e2ab559a1aff77acfce37bca4 Mon Sep 17 00:00:00 2001 From: Joao Grassi Date: Wed, 10 Jan 2024 14:43:05 -0300 Subject: [PATCH] Fix links now pointing to spec repo --- docs/general/attribute-definition.md | 48 ++++++++++++++++------------ 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/docs/general/attribute-definition.md b/docs/general/attribute-definition.md index 1b46da3e62..42a82a609e 100644 --- a/docs/general/attribute-definition.md +++ b/docs/general/attribute-definition.md @@ -1,10 +1,9 @@ -# Common specification concepts +# Attribute definition -**Status**: [Stable, Feature-freeze](../document-status.md) +**Status**: [Stable, Feature-freeze][DocumentStatus]
Table of Contents @@ -28,6 +27,7 @@ aliases: [/docs/reference/specification/common/common] An `Attribute` is a key-value pair, which MUST have the following properties: - The attribute key MUST be a non-`null` and non-empty string. + - Case sensitivity of keys is preserved. Keys that differ in casing are treated as distinct keys. - The attribute value is either: - A primitive type: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer. - An array of primitive type values. The array MUST be homogeneous, @@ -53,11 +53,13 @@ indices that are kept in sync (e.g., two attributes `header_keys` and `header_va both containing an array of strings to represent a mapping `header_keys[i] -> header_values[i]`). -See [Attribute Naming](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attribute-naming.md) for naming guidelines. +See [Attribute Naming](attribute-naming.md) for naming guidelines. -See [Requirement Level](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attribute-requirement-level.md) for requirement levels guidelines. +See [Requirement Level](attribute-requirement-level.md) for requirement levels guidelines. -See [this document](attribute-type-mapping.md) to find out how to map values obtained +See +[Mapping Arbitrary Data to OTLP AnyValue](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/attribute-type-mapping.md) +to find out how to map values obtained outside OpenTelemetry into OpenTelemetry attribute values. ### Attribute Limits @@ -115,16 +117,16 @@ attribute limits for Resources. Attributes, which belong to Metrics, are exempt from the limits described above at this time, as discussed in -[Metrics Attribute Limits](../metrics/sdk.md#attribute-limits). +[Metrics Attribute Limits](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#attribute-limits). ## Attribute Collections -[Resources](../resource/sdk.md), Metrics -[data points](../metrics/data-model.md#metric-points), -[Spans](../trace/api.md#set-attributes), Span -[Events](../trace/api.md#add-events), Span -[Links](../trace/api.md#link) and -[Log Records](../logs/data-model.md) may contain a collection of attributes. The +[Resources](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md), Metrics +[data points](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#metric-points), +[Spans](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-attributes), Span +[Events](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#add-events), Span +[Links](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#link) and +[Log Records](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md) may contain a collection of attributes. The keys in each such collection are unique, i.e. there MUST NOT exist more than one key-value pair with the same key. The enforcement of uniqueness may be performed in a variety of ways as it best fits the limitations of the particular @@ -134,17 +136,23 @@ Normally for the telemetry generated using OpenTelemetry SDKs the attribute key-value pairs are set via an API that either accepts a single key-value pair or a collection of key-value pairs. Setting an attribute with the same key as an existing attribute SHOULD overwrite the existing attribute's value. See for -example Span's [SetAttribute](../trace/api.md#set-attributes) API. +example Span's +[SetAttribute](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-attributes) +API. -A typical implementation of [SetAttribute](../trace/api.md#set-attributes) API -will enforce the uniqueness by overwriting any existing attribute values pending +A typical implementation of +[SetAttribute](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-attributes) +API will enforce the uniqueness by overwriting any existing attribute values pending to be exported, so that when the Span is eventually exported the exporters see only unique attributes. The OTLP format in particular requires that exported Resources, Spans, Metric data points and Log Records contain only unique attributes. Some other implementations may use a streaming approach where every -[SetAttribute](../trace/api.md#set-attributes) API call immediately results in -that individual attribute value being exported using a streaming wire protocol. -In such cases the enforcement of uniqueness will likely be the responsibility of -the recipient of this data. +[SetAttribute](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-attributes) +API call immediately results in that individual attribute value being exported +using a streaming wire protocol. In such cases the enforcement of uniqueness +will likely be the responsibility of the recipient of this data. + +[DocumentStatus]: + https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md