From 293dcee82248cd1bf039f2f80e8125465d573b28 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 19 Nov 2024 11:50:07 -0800 Subject: [PATCH 1/4] Add event_name to log proto --- CHANGELOG.md | 4 ++++ opentelemetry/proto/logs/v1/logs.proto | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b13a27f..c4246578e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The full list of changes can be found in the compare view for the respective release at . +### Added + +- logs: Add top-level `event_name` field to log records instead of `event.name` attribute. [#TODO](https://github.com/open-telemetry/opentelemetry-proto/pull/TODO) + ## 1.3.2 - 2024-06-28 ### Changed diff --git a/opentelemetry/proto/logs/v1/logs.proto b/opentelemetry/proto/logs/v1/logs.proto index f9b97dd74..73371e050 100644 --- a/opentelemetry/proto/logs/v1/logs.proto +++ b/opentelemetry/proto/logs/v1/logs.proto @@ -208,4 +208,11 @@ message LogRecord { // - the field is not present, // - the field contains an invalid value. bytes span_id = 10; + + // A globally unique identifier of event category/type among all events. All + // events with the same event_name MUST conform to the same schema for both their + // attributes and their body. + // + // Status: [Development] + string event_name = 11; } From a789b94493f71e8f669943670ab8cef750405495 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 19 Nov 2024 11:56:42 -0800 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4246578e..b41f47641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The full list of changes can be found in the compare view for the respective rel ### Added -- logs: Add top-level `event_name` field to log records instead of `event.name` attribute. [#TODO](https://github.com/open-telemetry/opentelemetry-proto/pull/TODO) +- logs: Add top-level `event_name` field to log records instead of `event.name` attribute. [#600](https://github.com/open-telemetry/opentelemetry-proto/pull/600) ## 1.3.2 - 2024-06-28 From 5b004ff25614ab60f442c9c79ea5905ba516fd4d Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 19 Nov 2024 12:00:43 -0800 Subject: [PATCH 3/4] update number --- opentelemetry/proto/logs/v1/logs.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/logs/v1/logs.proto b/opentelemetry/proto/logs/v1/logs.proto index 73371e050..77a44c394 100644 --- a/opentelemetry/proto/logs/v1/logs.proto +++ b/opentelemetry/proto/logs/v1/logs.proto @@ -214,5 +214,5 @@ message LogRecord { // attributes and their body. // // Status: [Development] - string event_name = 11; + string event_name = 12; } From 2238f88340b1cf3bb9f479d5d06bcb3877c5519c Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 19 Nov 2024 12:27:49 -0800 Subject: [PATCH 4/4] feedback --- opentelemetry/proto/logs/v1/logs.proto | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/opentelemetry/proto/logs/v1/logs.proto b/opentelemetry/proto/logs/v1/logs.proto index 77a44c394..cad4c4b12 100644 --- a/opentelemetry/proto/logs/v1/logs.proto +++ b/opentelemetry/proto/logs/v1/logs.proto @@ -209,9 +209,16 @@ message LogRecord { // - the field contains an invalid value. bytes span_id = 10; - // A globally unique identifier of event category/type among all events. All - // events with the same event_name MUST conform to the same schema for both their - // attributes and their body. + // A unique identifier of event category/type. + // All events with the same event_name are expected to conform to the same + // schema for both their attributes and their body. + // + // Recommended to be fully qualified and short (no longer than 256 characters). + // + // Presence of event_name on the log record identifies this record + // as an event. + // + // [Optional]. // // Status: [Development] string event_name = 12;