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.
This is an alternate to open-telemetry#2863 ## Problem "Event" is a confusing term that is understood differently by different people in different contexts. We would like to avoid using it if possible. ## Proposal The OpenTelemetry Event is defined as a LogRecord that has specific attributes, namely event.name and event.domain. The event.domain here is one of the important elements. It places the event definitions into isolated buckets (domains). We could use the term "Domenized Logs", but it sounds a bit weird, so I want to suggest renaming the concept of "domain" to "category", without changing the semantics. The specially shaped Log Records can be called "Categorized Logs" and have attributes "log.category" (previously known as "event.domain") and "log.name" (previously known as "event.name"). We will refrain from using the term "event" as much as possible to avoid confusion. I am open to other name suggestions for "Categorized Logs". We just want to make sure to avoid the word "events" and avoid inventing completely new terms, so some sort of adjective + "logs" seems to be the best approach. ## What Changes? - "Event" is renamed to "Categorized LogRecord" - "event.name" is renamed to "log.name" - "event.domain" is renamed to "log.category" - "log.category" is an attribute of LogRecord (instead of previously "event.domain" being a Scope attribute) ## What Did We Lose? "event.domain" previously could be recorded as a Scope attribute and be used for efficient batch processing/routing of logrecords. This is no longer possible, but we can add another such attribute in the future that serves the same purpose (e.g. see the [proposal to add "signal.type"](https://github.com/open-telemetry/opentelemetry-specification/pull/2863/files#r993794504)).
- Loading branch information
1 parent
5accc43
commit dc8faca
Showing
4 changed files
with
137 additions
and
64 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
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
27 changes: 27 additions & 0 deletions
27
specification/logs/semantic_conventions/categorizedlogs.md
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 @@ | ||
# Semantic Convention for Categorize Logs | ||
|
||
**Status**: [Experimental](../../document-status.md) | ||
|
||
This document describes the attributes of Categorized Logs that are represented | ||
by `LogRecord`s. All Categorized Logs have a name and a category. The category | ||
is a namespace for names and is used as a mechanism to avoid conflicts of | ||
names. | ||
|
||
<!-- semconv event --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|-----------------------|---|------------------------------------------------------------------------------------------------------------------------------|---|---| | ||
| `log.name` | string | The name identifies the log type. | `click`; `exception` | Required | | ||
| `log.category` | string | The category identifies the context in which the log is defined. An log name is unique only within a cagtegory. [1] | `browser` | Required | | ||
|
||
**[1]:** An `log.name` is supposed to be unique only in the context of an | ||
`log.category`, so this allows for two logs in different categories to | ||
have same `log.name`, yet be unrelated logs. | ||
|
||
`log.category` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used. | ||
|
||
| Value | Description | | ||
|---|--------------------------| | ||
| `browser` | Events from browser apps | | ||
| `device` | Events from mobile apps | | ||
| `k8s` | Events from Kubernetes | | ||
<!-- endsemconv --> |
This file was deleted.
Oops, something went wrong.