diff --git a/CHANGELOG.md b/CHANGELOG.md index b3bf96db340..2506f5d2acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,9 @@ release. ### Common +- Extend the set of attribute value types to support more complex data structures. + ([#4651](https://github.com/open-telemetry/opentelemetry-specification/pull/4651)) + ### Supplementary Guidelines ### OTEPs diff --git a/oteps/4485-extending-attributes-to-support-complex-values.md b/oteps/4485-extending-attributes-to-support-complex-values.md index 737c03732d4..dc361744792 100644 --- a/oteps/4485-extending-attributes-to-support-complex-values.md +++ b/oteps/4485-extending-attributes-to-support-complex-values.md @@ -23,6 +23,7 @@ * [Configurable OTLP exporter behavior (both SDK and Collector)](#configurable-otlp-exporter-behavior-both-sdk-and-collector) * [Record pointer to repetitive data](#record-pointer-to-repetitive-data) - [Backend research](#backend-research) +- [Appendix](#appendix) @@ -94,7 +95,7 @@ extending the standard attributes provides a more seamless and user-friendly API Currently, the SDK specification has a clause that says extending the set of standard attribute would be -[considered a breaking change](/specification/common/README.md#standard-attribute). +[considered a breaking change](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.44.0/specification/common/README.md#standard-attribute). We believe that removing this clause and extending standard attributes can be done gracefully across the OpenTelemetry ecosystem @@ -309,3 +310,9 @@ for additional details. > [!NOTE] > This list only reflects the behavior at the time of writing and may change in the future. + +## Appendix + +The [Extend the set of attribute value types #4651](https://github.com/open-telemetry/opentelemetry-specification/pull/4651) PR implements part of this OTEP by requiring that both the OTel API and SDK MUST support complex attributes. +Some languages aim to support complex attributes for all kinds of telemetry. +To maintain consistency across languages, we agreed that all languages should provide the same level of support for complex attributes. diff --git a/oteps/entities/0256-entities-data-model.md b/oteps/entities/0256-entities-data-model.md index 51d5a00faae..70d0fde0b5f 100644 --- a/oteps/entities/0256-entities-data-model.md +++ b/oteps/entities/0256-entities-data-model.md @@ -139,7 +139,7 @@ MAY change over the lifetime of the entity. MAY be empty. These attributes are not part of entity's identity.
Follows any
+href="https://github.com/open-telemetry/opentelemetry-specification/blob/v1.44.0/specification/logs/data-model.md#type-any">any
value definition in the OpenTelemetry spec - it can be a scalar value,
byte array, an array or map of values. Arbitrary deep nesting of values
for arrays and maps is allowed.
@@ -682,7 +682,7 @@ There are a couple of reasons:
### Attribute Data Type
The data model requires the Attributes field to use the extended
-[any](../../specification/logs/data-model.md#type-any)
+[any](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.44.0/specification/logs/data-model.md#type-any)
attribute values, that allows more complex data types. This is different from the data
type used by the Id field, which is more restricted in the shape.
diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md
index 4afb3f68fe9..1a98a55d299 100644
--- a/spec-compliance-matrix.md
+++ b/spec-compliance-matrix.md
@@ -199,7 +199,6 @@ Disclaimer: this list of features is still a work in progress, please refer to t
| LoggerProvider.Shutdown | | | + | | + | + | | + | | + | - | |
| LoggerProvider.ForceFlush | | | + | | + | + | | + | | + | - | |
| Logger.Emit(LogRecord) | | | + | | + | + | | + | | + | - | |
-| Reuse Standard Attributes | X | + | | | | | | | | | | |
| LogRecord.Set EventName | | + | | | | | | | + | + | | |
| Logger.Enabled | X | + | | | | | | + | + | + | | |
| SimpleLogRecordProcessor | | | + | | + | + | | + | | + | | |
diff --git a/spec-compliance-matrix/cpp.yaml b/spec-compliance-matrix/cpp.yaml
index 0f5e4ac5bac..822b5c76939 100644
--- a/spec-compliance-matrix/cpp.yaml
+++ b/spec-compliance-matrix/cpp.yaml
@@ -357,8 +357,6 @@ sections:
status: '+'
- name: Logger.Emit(LogRecord)
status: '+'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '+'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/dotnet.yaml b/spec-compliance-matrix/dotnet.yaml
index ccbf4bdb0c4..be292770c18 100644
--- a/spec-compliance-matrix/dotnet.yaml
+++ b/spec-compliance-matrix/dotnet.yaml
@@ -357,8 +357,6 @@ sections:
status: '-'
- name: Logger.Emit(LogRecord)
status: '-'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/erlang.yaml b/spec-compliance-matrix/erlang.yaml
index b5ee63fe9ea..a511671fe8c 100644
--- a/spec-compliance-matrix/erlang.yaml
+++ b/spec-compliance-matrix/erlang.yaml
@@ -357,8 +357,6 @@ sections:
status: '?'
- name: Logger.Emit(LogRecord)
status: '?'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/go.yaml b/spec-compliance-matrix/go.yaml
index 0d012d6d184..3e95ec07f9c 100644
--- a/spec-compliance-matrix/go.yaml
+++ b/spec-compliance-matrix/go.yaml
@@ -357,8 +357,6 @@ sections:
status: '?'
- name: Logger.Emit(LogRecord)
status: '?'
- - name: Reuse Standard Attributes
- status: '+'
- name: LogRecord.Set EventName
status: '+'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/java.yaml b/spec-compliance-matrix/java.yaml
index 6a5d80c2114..9f0bbe5ed94 100644
--- a/spec-compliance-matrix/java.yaml
+++ b/spec-compliance-matrix/java.yaml
@@ -357,8 +357,6 @@ sections:
status: '+'
- name: Logger.Emit(LogRecord)
status: '+'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/js.yaml b/spec-compliance-matrix/js.yaml
index c9b612f87d1..801a40128c0 100644
--- a/spec-compliance-matrix/js.yaml
+++ b/spec-compliance-matrix/js.yaml
@@ -357,8 +357,6 @@ sections:
status: '?'
- name: Logger.Emit(LogRecord)
status: '?'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/php.yaml b/spec-compliance-matrix/php.yaml
index 1ce9890a2a2..6cfa96fdb52 100644
--- a/spec-compliance-matrix/php.yaml
+++ b/spec-compliance-matrix/php.yaml
@@ -357,8 +357,6 @@ sections:
status: '+'
- name: Logger.Emit(LogRecord)
status: '+'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/python.yaml b/spec-compliance-matrix/python.yaml
index 3a6cecd32a1..d38947bf448 100644
--- a/spec-compliance-matrix/python.yaml
+++ b/spec-compliance-matrix/python.yaml
@@ -357,8 +357,6 @@ sections:
status: '+'
- name: Logger.Emit(LogRecord)
status: '+'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/ruby.yaml b/spec-compliance-matrix/ruby.yaml
index 89a407985f7..5087a89b4e5 100644
--- a/spec-compliance-matrix/ruby.yaml
+++ b/spec-compliance-matrix/ruby.yaml
@@ -357,8 +357,6 @@ sections:
status: '+'
- name: Logger.Emit(LogRecord)
status: '+'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/rust.yaml b/spec-compliance-matrix/rust.yaml
index db4430f71c3..f9c42583095 100644
--- a/spec-compliance-matrix/rust.yaml
+++ b/spec-compliance-matrix/rust.yaml
@@ -357,8 +357,6 @@ sections:
status: '?'
- name: Logger.Emit(LogRecord)
status: '?'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '+'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/swift.yaml b/spec-compliance-matrix/swift.yaml
index 9a8b194f38c..76d9ef90a39 100644
--- a/spec-compliance-matrix/swift.yaml
+++ b/spec-compliance-matrix/swift.yaml
@@ -357,8 +357,6 @@ sections:
status: '?'
- name: Logger.Emit(LogRecord)
status: '?'
- - name: Reuse Standard Attributes
- status: '?'
- name: LogRecord.Set EventName
status: '?'
- name: Logger.Enabled
diff --git a/spec-compliance-matrix/template.yaml b/spec-compliance-matrix/template.yaml
index 60d2b2e5b68..d3eb46a334b 100644
--- a/spec-compliance-matrix/template.yaml
+++ b/spec-compliance-matrix/template.yaml
@@ -234,8 +234,6 @@ sections:
- name: LoggerProvider.Shutdown
- name: LoggerProvider.ForceFlush
- name: Logger.Emit(LogRecord)
- - name: Reuse Standard Attributes
- optional: true
- name: LogRecord.Set EventName
- name: Logger.Enabled
optional: true
diff --git a/specification/common/README.md b/specification/common/README.md
index 82f634d5dc9..78b7dea9dae 100644
--- a/specification/common/README.md
+++ b/specification/common/README.md
@@ -8,15 +8,16 @@ path_base_for_github_subdir:
# Common specification concepts
-**Status**: [Stable](../document-status.md)
+**Status**: [Stable](../document-status.md), except where otherwise specified
MUST not change during the lifetime of the entity. The Id must contain at least one attribute. Follows OpenTelemetry [Standard attribute definition](../common/README.md#standard-attribute). SHOULD follow OpenTelemetry [semantic conventions](https://github.com/open-telemetry/semantic-conventions) for attributes. |
-| Description | map MAY change over the lifetime of the entity. MAY be empty. These attributes are not part of entity's identity. Follows [any](../logs/data-model.md#type-any) value definition in the OpenTelemetry spec. Arbitrary deep nesting of values for arrays and maps is allowed. SHOULD follow OpenTelemetry [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md) for attributes. |
+| Id | map MUST not change during the lifetime of the entity. The Id must contain at least one attribute. Follows OpenTelemetry [attribute definition](../common/README.md#attribute). SHOULD follow OpenTelemetry [semantic conventions](https://github.com/open-telemetry/semantic-conventions) for attributes. |
+| Description | map MAY change over the lifetime of the entity. MAY be empty. These attributes are not part of entity's identity. Follows OpenTelemetry [attribute definition](../common/README.md#attribute). SHOULD follow OpenTelemetry [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md) for attributes. |
## Minimally Sufficient Identity
diff --git a/specification/logs/api.md b/specification/logs/api.md
index 977770be6fb..66eb9c6b995 100644
--- a/specification/logs/api.md
+++ b/specification/logs/api.md
@@ -6,7 +6,7 @@ aliases: [bridge-api]
# Logs API
-**Status**: [Stable](../document-status.md), except where otherwise specified
+**Status**: [Stable](../document-status.md)
[Entity is defined here](../entities/data-model.md) |
-| Attributes | map\ MUST not change during the lifetime of the resource. Follows OpenTelemetry [Standard attribute definition](../common/README.md#standard-attribute). |
+| Attributes | map\ MUST not change during the lifetime of the resource. Follows OpenTelemetry [attribute definition](../common/README.md#attribute). |
## Identity
diff --git a/specification/resource/sdk.md b/specification/resource/sdk.md
index b7cb8cfa976..8a9a08b4cb0 100644
--- a/specification/resource/sdk.md
+++ b/specification/resource/sdk.md
@@ -13,7 +13,8 @@ For example, a process producing telemetry that is running in a
container on Kubernetes has a Pod name, it is in a namespace and possibly is
part of a Deployment which also has a name. All three of these attributes can be
included in the `Resource`. Note that there are certain
-["standard attributes"](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md) that have prescribed meanings.
+[attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md)
+that have prescribed meanings.
The primary purpose of resources as a first-class concept in the SDK is
decoupling of discovery of resource information from exporters. This allows for
Table of Contents
+- [AnyValue](#anyvalue)
+ * [map](#mapstring-anyvalue)
- [Attribute](#attribute)
- * [Standard Attribute](#standard-attribute)
* [Attribute Limits](#attribute-limits)
+ [Configurable Parameters](#configurable-parameters)
+ [Exempt Entities](#exempt-entities)
@@ -26,32 +27,40 @@ path_base_for_github_subdir:
Table of Contents
@@ -124,14 +124,6 @@ The API MUST accept the following parameters:
- [Attributes](./data-model.md#field-attributes) (optional)
- [Event Name](./data-model.md#field-eventname) (optional)
-**Status**: [Development](../document-status.md)
-
-The API SHOULD provide functionality for users to convert
-[Standard Attributes](../common/README.md#standard-attribute)
-so they can be used, or directly accept them, in the log signal.
-This allows the reuse of [Standard Attributes](../common/README.md#standard-attribute)
-across signals.
-
### Enabled
To help users avoid performing computationally expensive operations when
diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md
index 807e5899aa1..6893df5c1cb 100644
--- a/specification/logs/data-model.md
+++ b/specification/logs/data-model.md
@@ -430,14 +430,15 @@ when it is used to represent an unspecified severity.
### Field: `Body`
-Type: [`any`](#type-any).
+Type: [`any`](#type-any) or [AnyValue](../common/README.md#anyvalue).
Description: A value containing the body of the log record. Can be for example
a human-readable string message (including multi-line) describing the event in
a free form or it can be a structured data composed of arrays and maps of other
-values. Body MUST support [`any` type](#type-any) to preserve the semantics of
-structured logs emitted by the applications. Can vary for each occurrence of the
-event coming from the same source. This field is optional.
+values. Body MUST support [AnyValue](../common/README.md#anyvalue)
+to preserve the semantics of structured logs emitted by the applications.
+Can vary for each occurrence of the event coming from the same source.
+This field is optional.
### Field: `Resource`
@@ -464,15 +465,12 @@ they all have the same value of `InstrumentationScope`. This field is optional.
### Field: `Attributes`
-Type: [`map