General Logs Attributes
The attributes described in this section are rather generic. They may be used in any Log Record they apply to.
The following semantic conventions for logs are defined:
- General: General semantic attributes that may be used in describing Log Records.
- Exceptions: Semantic attributes that may be used in describing exceptions in logs.
- Feature Flags: Semantic attributes that may be used in describing feature flag evaluations in logs.
General log identification attributes
These attributes may be used for identifying a Log Record.
|string||A unique identifier for the Log Record. ||Opt-In|
: 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), but other identifiers (e.g. UUID) may be used as needed.
This section describes attributes for log media in OpenTelemetry. Log media are mechanisms by which logs are transmitted. Types of media include files, streams, network protocols, and os-specific logging services such as journald and Windows Event Log.
Note: The OpenTelemetry specification defines a Resource as
an immutable representation of the entity producing telemetry.
The following attributes do not describe entities that produce telemetry. Rather, they describe mechanisms of log transmission.
As such, these should be recorded as Log Record attributes when applicable. They should not be recorded as Resource attributes.
Description: A file to which log was emitted.
|string||The basename of the file.||Recommended|
|string||The full path to the file.||Opt-In|
|string||The basename of the file, with symlinks resolved.||Opt-In|
|string||The full path to the file, with symlinks resolved.||Opt-In|
Description: The I/O stream to which the log was emitted.
|string||The stream associated with the log. See below for a list of well-known values.||Opt-In|
log.iostream MUST be one of the following:
|Logs from stdout stream|
|Events from stderr stream|