diff --git a/.gitignore b/.gitignore index 71d4b9f93cc..52e56dc74e3 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ internal/tools/bin # Node.js files for tools (e.g. markdown-toc) node_modules/ package-lock.json + +# Visual Studio +.vs/ \ No newline at end of file diff --git a/semantic_conventions/logs/events.yaml b/semantic_conventions/logs/events.yaml index 246cfb551a0..978890b5bc7 100644 --- a/semantic_conventions/logs/events.yaml +++ b/semantic_conventions/logs/events.yaml @@ -29,4 +29,4 @@ groups: note: | An `event.name` is supposed to be unique only in the context of an `event.domain`, so this allows for two events in different domains to - have same `event.name`, yet be unrelated events. + have same `event.name`, yet be unrelated events. \ No newline at end of file diff --git a/specification/logs/semantic_conventions/events.md b/specification/logs/semantic_conventions/events.md index 16c132923a4..e148c3982e7 100644 --- a/specification/logs/semantic_conventions/events.md +++ b/specification/logs/semantic_conventions/events.md @@ -7,11 +7,23 @@ by `LogRecord`s. All standalone Events have a name and a domain. The Event domai is a namespace for event names and is used as a mechanism to avoid conflicts of event names. +Events MAY include domain-specific information about the occurrence (`payload`) +of the `event`, when present this information MUST be included in the `event.data` +attribute the values included SHOULD conform to the domain-specific defined schema +for the identified `event`. This is the primary container for details about the +`event`. + +Events MAY also include one or more additional Attributes which can be used to +provide additional context about the `event`, whether an Attribute is required +or optional SHOULD be defined by the domain-specific schema definition of the +`event`. + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `event.name` | string | The name identifies the event. | `click`; `exception` | Required | | `event.domain` | string | The domain identifies the context in which an event happened. An event name is unique only within a domain. [1] | `browser` | Required | +| `event.data` | [any](../data-model.md#type-any) \| [map](../data-model.md#type-mapstring-any) | The domain-specific `payload` of the `event` which provides details about the occurrence of the named event. | `{ connectStart: 100, connectEnd: 103, domainLookupStart: 80, domainLookupEnd: 90 }` | Optional | **[1]:** An `event.name` is supposed to be unique only in the context of an `event.domain`, so this allows for two events in different domains to @@ -24,4 +36,12 @@ have same `event.name`, yet be unrelated events. | `browser` | Events from browser apps | | `device` | Events from mobile apps | | `k8s` | Events from Kubernetes | + +`event.data` contains the domain-specific information about the occurrence of the + `event` (ie. the payload of the event). And may include details about the occurrence +or data that was change (depending on the schema of the domain-specific named event) + +The specification does not place any restriction on the fields or type of the +information included in the `event.data` Attribute as it's contents SHOULD conform +to the `schema` of the domain-specific event. \ No newline at end of file