From 8fb13cf491a6447cd17526e9936b309a0e8d95fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 27 Feb 2024 17:44:00 +0100 Subject: [PATCH] Clarify that logs attributes are a superset of standard attributes (#3852) --- CHANGELOG.md | 3 +++ specification/logs/data-model.md | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 120f8ebf246..71aea8633a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,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 diff --git a/specification/logs/data-model.md b/specification/logs/data-model.md index 4da9becbddc..8bace296920 100644 --- a/specification/logs/data-model.md +++ b/specification/logs/data-model.md @@ -442,13 +442,15 @@ 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 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 support [`any` type](#type-any), +a superset of [standard Attribute](../common/README.md#attribute), +to preserve the semantics of structured attributes emitted by the applications. This field is optional. #### Errors and Exceptions