From fadb4a549eb17401da3f8bff44b346538ea2f9fe Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 29 Apr 2024 22:19:39 -0700 Subject: [PATCH 1/4] Define span events to events mapping --- specification/logs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/logs/README.md b/specification/logs/README.md index 5980f25b7c2..f5eba863f8d 100644 --- a/specification/logs/README.md +++ b/specification/logs/README.md @@ -449,6 +449,7 @@ standard output. * [Logs Data Model](./data-model.md) * [Event API](./event-api.md) * [Trace Context in non-OTLP Log Formats](../compatibility/logging_trace_context.md) +* [Span Events to Events mapping](./span-events-mapping.md) ## References From 06f58776b34084573dc8746227fc60ab28060a72 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 29 Apr 2024 22:46:49 -0700 Subject: [PATCH 2/4] missing file --- specification/logs/span-events-mapping.md | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 specification/logs/span-events-mapping.md diff --git a/specification/logs/span-events-mapping.md b/specification/logs/span-events-mapping.md new file mode 100644 index 00000000000..aafa664e090 --- /dev/null +++ b/specification/logs/span-events-mapping.md @@ -0,0 +1,32 @@ +# Span Event to Events Mapping + +**Status**: [Experimental](../document-status.md) + +
+Table of Contents + + + + + + + +
+ +[Span Events](../trace/api.md#add-events) represent an event attached to a span and has a different structure than [Events](./event-api.md). + +Applications or telemetry consumers MAY transform Span Events to Events inside their span processing pipeline using the mappings defined in the document. + +Event API properties: + + + +- `Name` SHOULD match the Span Event name +- `Timestamp` SHOULD match Span Event timestamp +- `Context` SHOULD match the context of the span the Span Event is attached to. +- `SeverityNumber` - no mapping, not set. +- `Payload` SHOULD be set to the object deserialized from JSON string provided in the Span Event `event.data` attribute (if any). If deserialization fails with an error, the original string value of the `event.data` attribute SHOULD be used. +- `Attributes` SHOULD match Span Event attributes except those that were used to populate other event properties (`event.data`). + +The `EventLogger` used to report mapped Events SHOULD have the same instrumentation scope properties as the +Span the original Span Event is attached to. \ No newline at end of file From 3b9c2efea2c9cf029d56b9fb53f06f6f3a9954dc Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 29 Apr 2024 22:48:50 -0700 Subject: [PATCH 3/4] remove toc --- specification/logs/span-events-mapping.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/specification/logs/span-events-mapping.md b/specification/logs/span-events-mapping.md index aafa664e090..fc103def9bb 100644 --- a/specification/logs/span-events-mapping.md +++ b/specification/logs/span-events-mapping.md @@ -1,18 +1,7 @@ -# Span Event to Events Mapping +# Span Event to Event Mapping **Status**: [Experimental](../document-status.md) -
-Table of Contents - - - - - - - -
- [Span Events](../trace/api.md#add-events) represent an event attached to a span and has a different structure than [Events](./event-api.md). Applications or telemetry consumers MAY transform Span Events to Events inside their span processing pipeline using the mappings defined in the document. From 25d9dc3c8d01be00c5d7c1f87ea485131785d8ef Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 30 Apr 2024 08:41:31 -0700 Subject: [PATCH 4/4] nit --- specification/logs/span-events-mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/logs/span-events-mapping.md b/specification/logs/span-events-mapping.md index fc103def9bb..31474646c27 100644 --- a/specification/logs/span-events-mapping.md +++ b/specification/logs/span-events-mapping.md @@ -8,7 +8,7 @@ Applications or telemetry consumers MAY transform Span Events to Events inside t Event API properties: - + - `Name` SHOULD match the Span Event name - `Timestamp` SHOULD match Span Event timestamp