From 074c30a9c6ac47bc92d6eb7d1578716efb8e17f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Fri, 17 Jan 2025 16:42:39 +0100 Subject: [PATCH 01/13] Logs API to have ergonimics for reusing standard attributes --- specification/logs/api.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index 22a80d0d4ce..846dea3eb87 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -120,9 +120,14 @@ The API MUST accept the following parameters: - [Severity Number](./data-model.md#field-severitynumber) (optional) - [Severity Text](./data-model.md#field-severitytext) (optional) - [Body](./data-model.md#field-body) (optional) -- [Attributes](./data-model.md#field-attributes) (optional) +- [Attributes](./data-model.md#field-attributes) (optional) [1] - **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#field-eventname) (optional) +[1]: The API SHOULD provide ergonomics so that the caller can reuse +[Standard Attributes](../common/README.md#standard-attribute) +that are used when emitting telemetry for other signals. +This can be converting functions, method overloads, etc. + ### Enabled **Status**: [Development](../document-status.md) From f5de6a7e15faaf34d6bd141c61ce9cbc7cae6bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 20 Jan 2025 17:35:31 +0100 Subject: [PATCH 02/13] Update api.md --- specification/logs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index 846dea3eb87..a793cecbb16 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -123,7 +123,7 @@ The API MUST accept the following parameters: - [Attributes](./data-model.md#field-attributes) (optional) [1] - **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#field-eventname) (optional) -[1]: The API SHOULD provide ergonomics so that the caller can reuse +[1]: **Status**: [Development](../document-status.md) - The API SHOULD provide ergonomics so that the caller can reuse [Standard Attributes](../common/README.md#standard-attribute) that are used when emitting telemetry for other signals. This can be converting functions, method overloads, etc. From fff97f0b6772ce1e9ea457154100e0f214f210fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 20 Jan 2025 17:40:51 +0100 Subject: [PATCH 03/13] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c9b1faea49..c51c5387635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ release. ([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352)) - Make all `Logger` operations user-facing. ([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352)) +- Logs API should have ergonimics for reusing standard attributes. + ([#4373](https://github.com/open-telemetry/opentelemetry-specification/pull/4373)) ### Events From c4f644a7374e5ea869036d5496af838658dcaf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 21 Jan 2025 09:50:45 +0100 Subject: [PATCH 04/13] Apply suggestions from code review --- specification/logs/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index a793cecbb16..ea7b9dcce7d 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -125,7 +125,8 @@ The API MUST accept the following parameters: [1]: **Status**: [Development](../document-status.md) - The API SHOULD provide ergonomics so that the caller can reuse [Standard Attributes](../common/README.md#standard-attribute) -that are used when emitting telemetry for other signals. +along with log attributes of [type `map`](/specification/logs/data-model.md#type-mapstring-any). +This allows the reuse of attributes when emitting telemetry for other signals. This can be converting functions, method overloads, etc. ### Enabled From e53186b1f856136cb3784975913e3111b7d32bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 21 Jan 2025 09:51:47 +0100 Subject: [PATCH 05/13] Update api.md --- specification/logs/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index ea7b9dcce7d..b7e63e1a2d6 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -123,7 +123,8 @@ The API MUST accept the following parameters: - [Attributes](./data-model.md#field-attributes) (optional) [1] - **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#field-eventname) (optional) -[1]: **Status**: [Development](../document-status.md) - The API SHOULD provide ergonomics so that the caller can reuse +[1]: **Status**: [Development](../document-status.md) - +The API SHOULD provide ergonomics so that the caller can use [Standard Attributes](../common/README.md#standard-attribute) along with log attributes of [type `map`](/specification/logs/data-model.md#type-mapstring-any). This allows the reuse of attributes when emitting telemetry for other signals. From d46cc16d1c819bac81ee946e576fbfe3c512b64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 21 Jan 2025 09:56:19 +0100 Subject: [PATCH 06/13] Update api.md --- specification/logs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index b7e63e1a2d6..d1ae718d80d 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -126,7 +126,7 @@ The API MUST accept the following parameters: [1]: **Status**: [Development](../document-status.md) - The API SHOULD provide ergonomics so that the caller can use [Standard Attributes](../common/README.md#standard-attribute) -along with log attributes of [type `map`](/specification/logs/data-model.md#type-mapstring-any). +along with log attributes of [type `map`](./data-model.md#type-mapstring-any). This allows the reuse of attributes when emitting telemetry for other signals. This can be converting functions, method overloads, etc. From d295e586f1ec6f8b86456521ffefbb57db41ef79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 21 Jan 2025 18:30:40 +0100 Subject: [PATCH 07/13] Apply suggestions from code review Co-authored-by: Trask Stalnaker --- CHANGELOG.md | 2 +- specification/logs/api.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c51c5387635..4e323f621ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ release. ([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352)) - Make all `Logger` operations user-facing. ([#4352](https://github.com/open-telemetry/opentelemetry-specification/pull/4352)) -- Logs API should have ergonimics for reusing standard attributes. +- Logs API should have ergonomics for reusing standard attributes. ([#4373](https://github.com/open-telemetry/opentelemetry-specification/pull/4373)) ### Events diff --git a/specification/logs/api.md b/specification/logs/api.md index d1ae718d80d..a91ba7c0c8b 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -127,7 +127,7 @@ The API MUST accept the following parameters: The API SHOULD provide ergonomics so that the caller can use [Standard Attributes](../common/README.md#standard-attribute) along with log attributes of [type `map`](./data-model.md#type-mapstring-any). -This allows the reuse of attributes when emitting telemetry for other signals. +This allows the reuse of attributes across signals. This can be converting functions, method overloads, etc. ### Enabled From dff1617c8e5cbe25967ff6b426bff881a7be4f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 22 Jan 2025 08:31:36 +0100 Subject: [PATCH 08/13] Update api.md --- specification/logs/api.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index a91ba7c0c8b..ed126f2850f 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -126,8 +126,10 @@ The API MUST accept the following parameters: [1]: **Status**: [Development](../document-status.md) - The API SHOULD provide ergonomics so that the caller can use [Standard Attributes](../common/README.md#standard-attribute) -along with log attributes of [type `map`](./data-model.md#type-mapstring-any). -This allows the reuse of attributes across signals. +along with [Log Attributes](./data-model.md#field-attributes) +of [type `map`](./data-model.md#type-mapstring-any). +This allows the reuse of [Standard Attributes](../common/README.md#standard-attribute) +across signals. This can be converting functions, method overloads, etc. ### Enabled From fe89a786d42bcd50bc45e23aa762df57f7fe7218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 22 Jan 2025 08:49:54 +0100 Subject: [PATCH 09/13] Add "Reuse Standard Attributes" to compliance matrix --- spec-compliance-matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 192e9aab745..4f392616506 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -194,6 +194,7 @@ Disclaimer: this list of features is still a work in progress, please refer to t | LoggerProvider.ForceFlush | | | + | | + | | | + | | + | - | | | Logger.Emit(LogRecord) | | | + | | + | | | + | | + | - | | | Logger.EmitEvent(LogRecord) | | | | | | | | | | | | | +| Reuse Standard Attributes | X | + | | | | | | | | | | | | Logger.Enabled | X | + | | | | | | | + | + | | | | SimpleLogRecordProcessor | | | + | | + | | | + | | + | | | | BatchLogRecordProcessor | | | + | | + | | | + | | + | | | From 5ae9f2339674d5c71728fb28c3f578294cc7dac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 22 Jan 2025 08:50:46 +0100 Subject: [PATCH 10/13] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6d0ab3d68..03543713762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ release. ### Logs -- Logs API should have ergonomics for reusing standard attributes. +- Logs API should have ergonomics for reusing Standard Attributes. ([#4373](https://github.com/open-telemetry/opentelemetry-specification/pull/4373)) ### Baggage From 84fde750b6c681bf99727bccfbe066188ff32589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 22 Jan 2025 19:26:17 +0100 Subject: [PATCH 11/13] Update specification/logs/api.md --- specification/logs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index ed126f2850f..78dbfe6b3b9 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -124,7 +124,7 @@ The API MUST accept the following parameters: - **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#field-eventname) (optional) [1]: **Status**: [Development](../document-status.md) - -The API SHOULD provide ergonomics so that the caller can use +The API SHOULD provide functionality so that the caller can use [Standard Attributes](../common/README.md#standard-attribute) along with [Log Attributes](./data-model.md#field-attributes) of [type `map`](./data-model.md#type-mapstring-any). From da9eb9ed261338f2a6a8a3ae4e3af34a5b81b7de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 22 Jan 2025 19:26:56 +0100 Subject: [PATCH 12/13] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03543713762..6fdd28ab1dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ release. ### Logs -- Logs API should have ergonomics for reusing Standard Attributes. +- Logs API should have functionality for reusing Standard Attributes. ([#4373](https://github.com/open-telemetry/opentelemetry-specification/pull/4373)) ### Baggage From a91104dca74fb5f7db388832eb7191cb42033007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Wed, 22 Jan 2025 19:53:30 +0100 Subject: [PATCH 13/13] Update api.md --- specification/logs/api.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/logs/api.md b/specification/logs/api.md index a265dbfe353..a76181d4761 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -121,10 +121,11 @@ The API MUST accept the following parameters: - [Severity Number](./data-model.md#field-severitynumber) (optional) - [Severity Text](./data-model.md#field-severitytext) (optional) - [Body](./data-model.md#field-body) (optional) -- [Attributes](./data-model.md#field-attributes) (optional) [1] +- [Attributes](./data-model.md#field-attributes) (optional) - **Status**: [Development](../document-status.md) - [Event Name](./data-model.md#field-eventname) (optional) -[1]: **Status**: [Development](../document-status.md) - +**Status**: [Development](../document-status.md) + The API SHOULD provide functionality so that the caller can use [Standard Attributes](../common/README.md#standard-attribute) along with [Log Attributes](./data-model.md#field-attributes)