Skip to content

Commit

Permalink
moved logs/media.md to logs-general.md
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Wert <[email protected]>
  • Loading branch information
AlexanderWert committed Jun 29, 2023
1 parent 1abfedc commit 291361e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 48 deletions.
31 changes: 30 additions & 1 deletion specification/general/logs-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ They may be used in any Log Record they apply to.
<!-- toc -->

- [General log identification attributes](#general-log-identification-attributes)
- [Log Media](#log-media)
* [Log File](#log-file)
* [I/O Stream](#io-stream)

<!-- tocstop -->

The following semantic conventions for logs are defined:

* [General](#general-log-identification-attributes): General semantic attributes that may be used in describing Log Records.
* [Log Media](/specification/logs/semantic_conventions/media.md): Semantic attributes that may be used in describing the source of a log.
* [Exceptions](/specification/logs/semantic_conventions/exceptions.md): Semantic attributes that may be used in describing exceptions in logs.
* [Feature Flags](/specification/logs/semantic_conventions/feature-flags.md): Semantic attributes that may be used in describing feature flag evaluations in logs.

Expand All @@ -37,4 +39,31 @@ These attributes may be used for identifying a Log Record.
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 -->

## Log Media

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](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.21.0/specification/resource/sdk.md#resource-sdk) 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.

### Log File

**Description:** A file to which log was emitted.

| Name | Notes and examples |
| ------------------------------- | ---------------------------------------------------------------------------------------- |
| `log.file.name` | The basename of the file. Example: `audit.log` |
| `log.file.path` | The full path to the file. Example: `/var/log/mysql/audit.log` |
| `log.file.name_resolved` | The basename of the file, with symlinks resolved. Example: `uuid.log` |
| `log.file.path_resolved` | The full path to the file, with symlinks resolved. Example: `/var/lib/docker/uuid.log` |

### I/O Stream

**Description:** The I/O stream to which the log was emitted.

| Name | Notes and examples |
| ------------------------------- | ---------------------------------------------------------------------------------------- |
| `log.iostream` | The stream associated with the log. SHOULD be one of: `stdout`, `stderr` |

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/document-status.md
47 changes: 0 additions & 47 deletions specification/logs/semantic_conventions/media.md

This file was deleted.

0 comments on commit 291361e

Please sign in to comment.