From 32602d1ee75745a4ee3c42d6dc53b0d9a4abbb3e Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Tue, 9 Jul 2024 09:32:53 -0400 Subject: [PATCH 1/4] Add 'log.record.original' attribute --- .chloggen/log-original-body.yaml | 22 ++++++++++++++++++++++ docs/attributes-registry/log.md | 11 +++++++---- docs/general/logs.md | 7 +++++-- model/logs/general.yaml | 2 ++ model/registry/log.yaml | 11 +++++++++++ 5 files changed, 47 insertions(+), 6 deletions(-) create mode 100755 .chloggen/log-original-body.yaml diff --git a/.chloggen/log-original-body.yaml b/.chloggen/log-original-body.yaml new file mode 100755 index 0000000000..858bf4242e --- /dev/null +++ b/.chloggen/log-original-body.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: log + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add 'log.record.original' attribute. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [1137] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/attributes-registry/log.md b/docs/attributes-registry/log.md index 837a982cb5..cab03d459c 100644 --- a/docs/attributes-registry/log.md +++ b/docs/attributes-registry/log.md @@ -40,9 +40,12 @@ Attributes for a file to which log was emitted. This document defines the generic attributes that may be used in any Log Record. -| Attribute | Type | Description | Examples | Stability | -| ---------------- | ------ | ------------------------------------------- | ---------------------------- | ---------------------------------------------------------------- | -| `log.record.uid` | string | A unique identifier for the Log Record. [1] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Attribute | Type | Description | Examples | Stability | +| --------------------- | ------ | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| `log.record.original` | string | The complete orignal Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `log.record.uid` | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. +**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. A syslog or log record read from a file.) + +**[2]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. diff --git a/docs/general/logs.md b/docs/general/logs.md index 499b719841..4964a82f41 100644 --- a/docs/general/logs.md +++ b/docs/general/logs.md @@ -44,9 +44,12 @@ These attributes may be used for identifying a Log Record. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`log.record.uid`](/docs/attributes-registry/log.md) | string | A unique identifier for the Log Record. [1] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`log.record.original`](/docs/attributes-registry/log.md) | string | The complete orignal Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`log.record.uid`](/docs/attributes-registry/log.md) | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. +**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. A syslog or log record read from a file.) + +**[2]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. diff --git a/model/logs/general.yaml b/model/logs/general.yaml index b4afe2c16c..d4835d6982 100644 --- a/model/logs/general.yaml +++ b/model/logs/general.yaml @@ -6,3 +6,5 @@ groups: attributes: - ref: log.record.uid requirement_level: opt_in + - ref: log.record.original + requirement_level: opt_in diff --git a/model/registry/log.yaml b/model/registry/log.yaml index b26870a696..48aeda8bf4 100644 --- a/model/registry/log.yaml +++ b/model/registry/log.yaml @@ -70,3 +70,14 @@ groups: The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. examples: ["01ARZ3NDEKTSV4RRFFQ69G5FAV"] + - id: original + type: string + stability: experimental + brief: > + The complete orignal Log Record. + note: > + This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND + the Body field of the Log Record does not contain the same value. (e.g. A syslog or log record read from a file.) + examples: + - "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened" + - "[INFO] 8/3/24 12:34:56 Something happened" From 9c35c90862abc374256a24b6065e7ced257809a8 Mon Sep 17 00:00:00 2001 From: Daniel Jaglowski Date: Tue, 9 Jul 2024 10:33:21 -0500 Subject: [PATCH 2/4] Update docs/general/logs.md Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> --- docs/general/logs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/general/logs.md b/docs/general/logs.md index 4964a82f41..8ef65c3b8e 100644 --- a/docs/general/logs.md +++ b/docs/general/logs.md @@ -47,7 +47,7 @@ These attributes may be used for identifying a Log Record. | [`log.record.original`](/docs/attributes-registry/log.md) | string | The complete orignal Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`log.record.uid`](/docs/attributes-registry/log.md) | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. A syslog or log record read from a file.) +**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or log record read from a file.) **[2]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. From 22a15fc627c45b4bef13e6b6f0f58dedbf6555ed Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Tue, 9 Jul 2024 09:32:53 -0400 Subject: [PATCH 3/4] Add 'log.record.original' attribute --- docs/attributes-registry/log.md | 2 +- model/registry/log.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/attributes-registry/log.md b/docs/attributes-registry/log.md index cab03d459c..6383ac7843 100644 --- a/docs/attributes-registry/log.md +++ b/docs/attributes-registry/log.md @@ -45,7 +45,7 @@ This document defines the generic attributes that may be used in any Log Record. | `log.record.original` | string | The complete orignal Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `log.record.uid` | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. A syslog or log record read from a file.) +**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or log record read from a file.) **[2]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. diff --git a/model/registry/log.yaml b/model/registry/log.yaml index 48aeda8bf4..90190a1b77 100644 --- a/model/registry/log.yaml +++ b/model/registry/log.yaml @@ -77,7 +77,7 @@ groups: The complete orignal Log Record. note: > This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND - the Body field of the Log Record does not contain the same value. (e.g. A syslog or log record read from a file.) + the Body field of the Log Record does not contain the same value. (e.g. a syslog or log record read from a file.) examples: - "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened" - "[INFO] 8/3/24 12:34:56 Something happened" From 1423af7a0cec4abcf59dac87594ce364299201c1 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Wed, 10 Jul 2024 14:59:52 -0400 Subject: [PATCH 4/4] Incorporate feedback --- docs/attributes-registry/log.md | 2 +- docs/general/logs.md | 2 +- model/registry/log.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/attributes-registry/log.md b/docs/attributes-registry/log.md index 6383ac7843..7aeff8c921 100644 --- a/docs/attributes-registry/log.md +++ b/docs/attributes-registry/log.md @@ -45,7 +45,7 @@ This document defines the generic attributes that may be used in any Log Record. | `log.record.original` | string | The complete orignal Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `log.record.uid` | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or log record read from a file.) +**[1]:** This value MAY be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.) **[2]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. diff --git a/docs/general/logs.md b/docs/general/logs.md index 8ef65c3b8e..b48b379edd 100644 --- a/docs/general/logs.md +++ b/docs/general/logs.md @@ -47,7 +47,7 @@ These attributes may be used for identifying a Log Record. | [`log.record.original`](/docs/attributes-registry/log.md) | string | The complete orignal Log Record. [1] | `77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened`; `[INFO] 8/3/24 12:34:56 Something happened` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`log.record.uid`](/docs/attributes-registry/log.md) | string | A unique identifier for the Log Record. [2] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or log record read from a file.) +**[1]:** This value MAY be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.) **[2]:** If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values. The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. diff --git a/model/registry/log.yaml b/model/registry/log.yaml index 90190a1b77..bc18100451 100644 --- a/model/registry/log.yaml +++ b/model/registry/log.yaml @@ -76,8 +76,8 @@ groups: brief: > The complete orignal Log Record. note: > - This value SHOULD be provided if the Log Record was originally transmitted as a string or equivalent data type AND - the Body field of the Log Record does not contain the same value. (e.g. a syslog or log record read from a file.) + This value MAY be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND + the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.) examples: - "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened" - "[INFO] 8/3/24 12:34:56 Something happened"