forked from open-telemetry/opentelemetry-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add semantic conventions for log record ID (open-telemetry#3047)
Fixes open-telemetry#597 ## Changes - Add a section for "generic attributes" to the log semconv - Add an attribute `log_record.id` making use of ULID as discussed in open-telemetry#597 Some additional notes: - I kept the PR small, so I left out some other potential attributes, e.g. something for pre-existing ID (like windows event logs) or for storing the used logging/eventing system or even something like a "signature" that might be worth discussing, etc. - I followed the structure of "generic attributes" from the spans semconv - I took some of the existing wording from open-telemetry#597 & open-telemetry/oteps#97 (comment) to describe the field --------- Signed-off-by: svrnm <[email protected]> Co-authored-by: Joao Grassi <[email protected]> Co-authored-by: jack-berg <[email protected]> Co-authored-by: Tigran Najaryan <[email protected]>
- Loading branch information
1 parent
f79ed96
commit beda134
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
groups: | ||
- id: log.record | ||
prefix: log.record | ||
brief: > | ||
The attributes described in this section are rather generic. They may be used in any Log Record they apply to. | ||
attributes: | ||
- id: uid | ||
type: string | ||
requirement_level: opt_in | ||
brief: > | ||
A unique identifier for the Log Record. | ||
note: > | ||
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. | ||
examples: ["01ARZ3NDEKTSV4RRFFQ69G5FAV"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# General attributes | ||
|
||
**Status**: [Experimental](../../document-status.md) | ||
|
||
The attributes described in this section are rather generic. | ||
They may be used in any Log Record they apply to. | ||
|
||
<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` --> | ||
|
||
<!-- toc --> | ||
|
||
- [General log identification attributes](#general-log-identification-attributes) | ||
|
||
<!-- tocstop --> | ||
|
||
## General log identification attributes | ||
|
||
These attributes may be used for identifying a Log Record. | ||
|
||
<!-- semconv log.record --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `log.record.uid` | string | A unique identifier for the Log Record. [1] | `01ARZ3NDEKTSV4RRFFQ69G5FAV` | Opt-In | | ||
|
||
**[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. | ||
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. | ||
<!-- endsemconv --> |