From c68ad1b67ca9699a7d944c7a7a3aa99101a9086d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 09:53:46 +0100 Subject: [PATCH 01/11] Clarify what LogRecordProcessor is able to modify --- specification/logs/sdk.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 0cef89a29bd..02e9c221af7 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -135,8 +135,9 @@ following `LogRecord`-like interfaces are defined in the SDK: ### ReadableLogRecord A function receiving this as an argument MUST be able to access all the -information added to the [LogRecord](data-model.md#log-and-event-record-definition). It MUST also be able to -access the [Instrumentation Scope](./data-model.md#field-instrumentationscope) +information added to the [LogRecord](data-model.md#log-and-event-record-definition). + +It MUST also be able to access the [Instrumentation Scope](./data-model.md#field-instrumentationscope) and [Resource](./data-model.md#field-resource) information (implicitly) associated with the `LogRecord`. @@ -154,11 +155,17 @@ value type. ### ReadWriteLogRecord -A function receiving this as an argument MUST be able to write to the -full [LogRecord](data-model.md#log-and-event-record-definition) and additionally MUST be able to retrieve all -information -that was added to the `LogRecord` (as with -[ReadableLogRecord](#readablelogrecord)). +ReadWriteLogRecord is a superset of [ReadableLogRecord](#readablelogrecord). + +A function receiving this as an argument MUST additionally be able to modify the +following information added to the [LogRecord](data-model.md#log-and-event-record-definition): + +* [`Timestamp`](data-model.md#field-timestamp) +* [`ObservedTimestamp`](data-model.md#field-observedtimestamp) +* [`SeverityText`](data-model.md#field-severitytext) +* [`SeverityNumber`](data-model.md#field-severitynumber) +* [`Body`](data-model.md#field-body) +* [`Attributes`](data-model.md#field-attributes) ## LogRecord Limits From 9ee8a19476d271ba9da17409e08d2a92e68cd4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 09:57:55 +0100 Subject: [PATCH 02/11] Update sdk.md --- specification/logs/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 02e9c221af7..c0811b974dc 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -165,7 +165,7 @@ following information added to the [LogRecord](data-model.md#log-and-event-recor * [`SeverityText`](data-model.md#field-severitytext) * [`SeverityNumber`](data-model.md#field-severitynumber) * [`Body`](data-model.md#field-body) -* [`Attributes`](data-model.md#field-attributes) +* [`Attributes`](data-model.md#field-attributes) (it includes: adding, modifying, removing) ## LogRecord Limits From 00e7ab5513fe054711ce2c90894842b316cf8f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 09:59:07 +0100 Subject: [PATCH 03/11] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b040c61a9d3..dab7994f32b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ release. ### Logs +- Explicitly define what can be modified via ReadWriteLogRecord. + ([#3907](https://github.com/open-telemetry/opentelemetry-specification/pull/3907)) + ### Resource ### OpenTelemetry Protocol From 123489e12c90f4129887afd2f57524b2ae4853f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 10:10:26 +0100 Subject: [PATCH 04/11] Update sdk.md --- specification/logs/sdk.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index c0811b974dc..48b09e0c916 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -157,15 +157,8 @@ value type. ReadWriteLogRecord is a superset of [ReadableLogRecord](#readablelogrecord). -A function receiving this as an argument MUST additionally be able to modify the -following information added to the [LogRecord](data-model.md#log-and-event-record-definition): - -* [`Timestamp`](data-model.md#field-timestamp) -* [`ObservedTimestamp`](data-model.md#field-observedtimestamp) -* [`SeverityText`](data-model.md#field-severitytext) -* [`SeverityNumber`](data-model.md#field-severitynumber) -* [`Body`](data-model.md#field-body) -* [`Attributes`](data-model.md#field-attributes) (it includes: adding, modifying, removing) +A function receiving this as an argument MUST additionally be able to modify +all the information added via [Emit a LogRecord](bridge-api.md#emit-a-logrecord). ## LogRecord Limits From 7cdf1ff8cfad498f56a6438c0e42af5f822d042b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 10:13:55 +0100 Subject: [PATCH 05/11] Update sdk.md --- specification/logs/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 48b09e0c916..93d93ab58c3 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -135,7 +135,7 @@ following `LogRecord`-like interfaces are defined in the SDK: ### ReadableLogRecord A function receiving this as an argument MUST be able to access all the -information added to the [LogRecord](data-model.md#log-and-event-record-definition). +information added via [Emit a LogRecord](bridge-api.md#emit-a-logrecord). It MUST also be able to access the [Instrumentation Scope](./data-model.md#field-instrumentationscope) and [Resource](./data-model.md#field-resource) information (implicitly) From e701c6b76c91ebdccfb09d0a769637ca0678e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 10:25:40 +0100 Subject: [PATCH 06/11] Update sdk.md --- specification/logs/sdk.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 93d93ab58c3..8f8a35ce46f 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -135,9 +135,8 @@ following `LogRecord`-like interfaces are defined in the SDK: ### ReadableLogRecord A function receiving this as an argument MUST be able to access all the -information added via [Emit a LogRecord](bridge-api.md#emit-a-logrecord). - -It MUST also be able to access the [Instrumentation Scope](./data-model.md#field-instrumentationscope) +information added to the [LogRecord](data-model.md#log-and-event-record-definition). It MUST also be able to +access the [Instrumentation Scope](./data-model.md#field-instrumentationscope) and [Resource](./data-model.md#field-resource) information (implicitly) associated with the `LogRecord`. From d3d1de328af0b308e5340497cf343c9c6037c0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 10:33:13 +0100 Subject: [PATCH 07/11] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dab7994f32b..4beff5b5ed0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ release. ### Logs -- Explicitly define what can be modified via ReadWriteLogRecord. +- Fix what can be modified via `ReadWriteLogRecord`. ([#3907](https://github.com/open-telemetry/opentelemetry-specification/pull/3907)) ### Resource From bc2c48fd51f9f00b82889c0f921b0277b8f482ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 18:08:24 +0100 Subject: [PATCH 08/11] Update sdk.md --- specification/logs/sdk.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 8f8a35ce46f..3a83db13439 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -157,7 +157,8 @@ value type. ReadWriteLogRecord is a superset of [ReadableLogRecord](#readablelogrecord). A function receiving this as an argument MUST additionally be able to modify -all the information added via [Emit a LogRecord](bridge-api.md#emit-a-logrecord). +all the information added via [Emit a LogRecord](bridge-api.md#emit-a-logrecord) +except `Context`. ## LogRecord Limits From 6c328bc1702ae29a4d7ed484814c5caa5b0141e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 12 Mar 2024 10:46:06 +0100 Subject: [PATCH 09/11] Update specification/logs/sdk.md --- specification/logs/sdk.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 3a83db13439..2f2a3bb0fe9 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -157,8 +157,14 @@ value type. ReadWriteLogRecord is a superset of [ReadableLogRecord](#readablelogrecord). A function receiving this as an argument MUST additionally be able to modify -all the information added via [Emit a LogRecord](bridge-api.md#emit-a-logrecord) -except `Context`. +the following information added to the [LogRecord](data-model.md#log-and-event-record-definition): + +* `Timestamp` +* `ObservedTimestamp` +* `SeverityText` +* `SeverityNumber` +* `Body` +* `Attributes` (addition, modification, removal) ## LogRecord Limits From d5c2169b1a3e75cd40838fad05e620940b069f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 12 Mar 2024 10:50:36 +0100 Subject: [PATCH 10/11] Update sdk.md --- specification/logs/sdk.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 2f2a3bb0fe9..f4a51bc6507 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -165,6 +165,9 @@ the following information added to the [LogRecord](data-model.md#log-and-event-r * `SeverityNumber` * `Body` * `Attributes` (addition, modification, removal) +* `TraceId` +* `SpanId` +* `TraceFlags` ## LogRecord Limits From d871902454e0586148edbbbe3d358d8c04d20400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 25 Mar 2024 16:49:10 +0100 Subject: [PATCH 11/11] Update sdk.md --- specification/logs/sdk.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 6da2105d06a..59f1cedc2fb 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -159,15 +159,15 @@ ReadWriteLogRecord is a superset of [ReadableLogRecord](#readablelogrecord). A function receiving this as an argument MUST additionally be able to modify the following information added to the [LogRecord](data-model.md#log-and-event-record-definition): -* `Timestamp` -* `ObservedTimestamp` -* `SeverityText` -* `SeverityNumber` -* `Body` -* `Attributes` (addition, modification, removal) -* `TraceId` -* `SpanId` -* `TraceFlags` +* [`Timestamp`](./data-model.md#field-timestamp) +* [`ObservedTimestamp`](./data-model.md#field-observedtimestamp) +* [`SeverityText`](./data-model.md#field-severitytext) +* [`SeverityNumber`](./data-model.md#field-severitynumber) +* [`Body`](./data-model.md#field-body) +* [`Attributes`](./data-model.md#field-attributes) (addition, modification, removal) +* [`TraceId`](./data-model.md#field-traceid) +* [`SpanId`](./data-model.md#field-spanid) +* [`TraceFlags`](./data-model.md#field-traceflags) ## LogRecord Limits