From 9831851e5763d5712e8f5d33484ac44e593669e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 11:02:17 +0100 Subject: [PATCH 01/10] Clarify that logs attributes are a superset of common attributes --- specification/logs/data-model.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 675724d8349..18315749711 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -411,7 +411,9 @@ structured data composed of arrays and maps of other values. First-party Applications SHOULD use a string message. However, a structured body SHOULD be used to preserve the semantics of structured logs emitted by Third-party Applications. Can vary for each occurrence of the event coming from the same -source. This field is optional. +source. + +This field is optional. ### Field: `Resource` @@ -426,6 +428,7 @@ that represent this data model may be designed in a manner that allows the `Resource` field to be recorded only once per batch of log records that come from the same source. SHOULD follow OpenTelemetry [semantic conventions for Resources](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md). + This field is optional. ### Field: `InstrumentationScope` @@ -449,8 +452,10 @@ Type: `map`. Description: Additional information about the specific event occurrence. Unlike the `Resource` field, which is fixed for a particular source, `Attributes` can vary for each occurrence of the event coming from the same source. Can contain -information about the request context (other than TraceId/SpanId). SHOULD follow -OpenTelemetry [semantic conventions for attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md). +information about the request context (other than [Trace Context Fields](#trace-context-fields)). +The log attribute model MUST be of [`any` type](#type-any), +which is different from [Common Attribute](../common/README.md#attribute) (a superset), +so that [Logs Bridge API](bridge-api.md) is able to support structured attributes. This field is optional. #### Errors and Exceptions From 6535104527559df94b4b807482578cd4d6a4039a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 11:04:13 +0100 Subject: [PATCH 02/10] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c78bff6ac42..87299c3e109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ release. - Fix `Resource` field type in Logs Data Model. ([#3826](https://github.com/open-telemetry/opentelemetry-specification/pull/3826)) +- Clarify that logs attributes are a superset of common attributes. + ([#3852](https://github.com/open-telemetry/opentelemetry-specification/pull/3852)) ### Resource From 2b19cb6b56d78f8fbb827bcd57874e510d81d407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 11:04:51 +0100 Subject: [PATCH 03/10] Tidy --- specification/logs/data-model.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 18315749711..cc627cb97fb 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -411,9 +411,7 @@ structured data composed of arrays and maps of other values. First-party Applications SHOULD use a string message. However, a structured body SHOULD be used to preserve the semantics of structured logs emitted by Third-party Applications. Can vary for each occurrence of the event coming from the same -source. - -This field is optional. +source. This field is optional. ### Field: `Resource` @@ -428,7 +426,6 @@ that represent this data model may be designed in a manner that allows the `Resource` field to be recorded only once per batch of log records that come from the same source. SHOULD follow OpenTelemetry [semantic conventions for Resources](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md). - This field is optional. ### Field: `InstrumentationScope` From 287231e29ed973199eb3e19cd072d10846454c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 11:08:07 +0100 Subject: [PATCH 04/10] Align wording for consistency --- specification/logs/data-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index cc627cb97fb..18ba4bf5015 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -452,7 +452,7 @@ vary for each occurrence of the event coming from the same source. Can contain information about the request context (other than [Trace Context Fields](#trace-context-fields)). The log attribute model MUST be of [`any` type](#type-any), which is different from [Common Attribute](../common/README.md#attribute) (a superset), -so that [Logs Bridge API](bridge-api.md) is able to support structured attributes. +so that is able to support structured attributes emitted by the applications. This field is optional. #### Errors and Exceptions From 55787309e206e258d5eccb144b6903b3fda50625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 11:16:43 +0100 Subject: [PATCH 05/10] Add hyperlink --- specification/logs/data-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 18ba4bf5015..622e40025f5 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -444,7 +444,7 @@ is optional. ### Field: `Attributes` -Type: `map`. +Type: [`map`](#type-mapstring-any). Description: Additional information about the specific event occurrence. Unlike the `Resource` field, which is fixed for a particular source, `Attributes` can From c790658b1c40068d9e6345a4334fe282e5c057e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 11:34:09 +0100 Subject: [PATCH 06/10] be -> support --- specification/logs/data-model.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 622e40025f5..54031289b9f 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -450,9 +450,9 @@ Description: Additional information about the specific event occurrence. Unlike the `Resource` field, which is fixed for a particular source, `Attributes` can vary for each occurrence of the event coming from the same source. Can contain information about the request context (other than [Trace Context Fields](#trace-context-fields)). -The log attribute model MUST be of [`any` type](#type-any), -which is different from [Common Attribute](../common/README.md#attribute) (a superset), -so that is able to support structured attributes emitted by the applications. +The log attribute model MUST support [`any` type](#type-any), +distinct from [Common Attribute](../common/README.md#attribute) (a superset), +to preserve the semantics of structured attributes emitted by the applications. This field is optional. #### Errors and Exceptions From 03dec1a688c0291aac954c61bb40bc64f21ad073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 20:49:13 +0100 Subject: [PATCH 07/10] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87299c3e109..66e6cd31569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ release. - Fix `Resource` field type in Logs Data Model. ([#3826](https://github.com/open-telemetry/opentelemetry-specification/pull/3826)) -- Clarify that logs attributes are a superset of common attributes. +- Clarify that logs attributes are a superset of standard attributes. ([#3852](https://github.com/open-telemetry/opentelemetry-specification/pull/3852)) ### Resource From e7759b14a290032b44f6d098c8c7bb3e323aaa9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 31 Jan 2024 20:49:23 +0100 Subject: [PATCH 08/10] Update specification/logs/data-model.md --- specification/logs/data-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 54031289b9f..06a3cfe4bbc 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -451,7 +451,7 @@ the `Resource` field, which is fixed for a particular source, `Attributes` can vary for each occurrence of the event coming from the same source. Can contain information about the request context (other than [Trace Context Fields](#trace-context-fields)). The log attribute model MUST support [`any` type](#type-any), -distinct from [Common Attribute](../common/README.md#attribute) (a superset), +distinct from [standard Attribute](../common/README.md#attribute) (a superset), to preserve the semantics of structured attributes emitted by the applications. This field is optional. From d286babe6f0895f370badaaadc66300def3cdf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 6 Feb 2024 20:00:27 +0100 Subject: [PATCH 09/10] Update specification/logs/data-model.md --- specification/logs/data-model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 75252b70059..98c271f9630 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -451,7 +451,7 @@ the `Resource` field, which is fixed for a particular source, `Attributes` can vary for each occurrence of the event coming from the same source. Can contain information about the request context (other than [Trace Context Fields](#trace-context-fields)). The log attribute model MUST support [`any` type](#type-any), -distinct from [standard Attribute](../common/README.md#attribute) (a superset), +a superset of [standard Attribute](../common/README.md#attribute), to preserve the semantics of structured attributes emitted by the applications. This field is optional. From 4e0488a87804797c5148f85a554015236067d613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 19 Feb 2024 13:15:04 +0100 Subject: [PATCH 10/10] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a8a426e81..0935c09d1a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ release. ### Logs +- Clarify that logs attributes are a superset of standard attributes. + ([#3852](https://github.com/open-telemetry/opentelemetry-specification/pull/3852)) + ### Resource ### OpenTelemetry Protocol @@ -50,8 +53,6 @@ release. - Fix `Resource` field type in Logs Data Model. ([#3826](https://github.com/open-telemetry/opentelemetry-specification/pull/3826)) -- Clarify that logs attributes are a superset of standard attributes. - ([#3852](https://github.com/open-telemetry/opentelemetry-specification/pull/3852)) - Remove confusing description from `Body` field in Logs Data Model to make it clear the Bridge API must support a structured body. ([#3827](https://github.com/open-telemetry/opentelemetry-specification/pull/3827)) - Deconstruct number scalar type to double and signed integer.