Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ release.
([#459](https://github.com/open-telemetry/semantic-conventions/pull/459))
- Make `client.address` sampling relevant on HTTP server spans.
([#469](https://github.com/open-telemetry/semantic-conventions/pull/469))
- BREAKING: Remove `event.domain` from log event attributes.
([#473](https://github.com/open-telemetry/semantic-conventions/pull/473))
- BREAKING: Change `event.name` definition to include `namespace`.
([#473](https://github.com/open-telemetry/semantic-conventions/pull/473))

### Features

Expand Down
24 changes: 12 additions & 12 deletions docs/general/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ The following semantic conventions for events are defined:
## General event attributes

Events are recorded as LogRecords that are shaped
in a special way: Event LogRecords have the attributes `event.domain`
and `event.name` (and possibly other LogRecord attributes).
in a special way: Event LogRecords have the attribute
`event.name` consisting of a dot-separated `namespace` and `name` that
uniquely identifies the event. Events may also have other LogRecord attributes.

The `event.domain` attribute is used to logically separate events from different
The `namespace` portion is used to logically separate events from different
systems. For example, to record Events from browser apps, mobile apps and
Kubernetes, we could use `browser`, `device` and `k8s` as the domain for their
Kubernetes, we could use `browser`, `device` and `k8s` as the `namespace` for their
Events. This provides a clean separation of semantics for events in each of the
domains.

Within a particular domain, the `event.name` attribute identifies the event.
Events with same domain and name are structurally similar to one another. For
example, some domains could have well-defined schema for their events based on
event names.
Within a particular `namespace`, the `name` portion identifies the event.
Events with same `event.name` are structurally similar to one another.

When recording events from an existing system as OpenTelemetry Events, it is
possible that the existing system does not have the equivalent of a name or
Expand All @@ -43,18 +42,19 @@ that identify the class of Events but not the instance of the Event.
<!-- semconv event -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `event.domain` | string | The domain identifies the business context for the events. [1] | `browser` | Required |
| `event.name` | string | The name identifies the event. | `click`; `exception` | Required |
| `event.name` | string | Consisting of a `namespace` and `name`; uniquely identifies the event. | `browser.mouse.click`; `browser.exception` | Required |

**[1]:** Events across different domains may have same `event.name`, yet be unrelated events.

`event.domain` 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.
The `namespace` portion of the name 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 |

The `namespace` and `name` portions of `event.name` MUST be separated by a period (`.`). Periods MUST NOT be used in the `name` portion of the `event.name`
value. Instead, for multi-word `name` portions, each word SHOULD be separated by underscores (i.e. use snake_case). See [Attribute Naming](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/common/attribute-naming.md) for details on namespaces and names.
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
25 changes: 4 additions & 21 deletions model/logs/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,7 @@ groups:
type: string
requirement_level: required
brief: >
The name identifies the event.
examples: ['click', 'exception']
- id: domain
brief: >
The domain identifies the business context for the events.
type:
allow_custom_values: true
members:
- id: browser
value: 'browser'
brief: 'Events from browser apps'
- id: device
value: 'device'
brief: 'Events from mobile apps'
- id: k8s
value: 'k8s'
brief: 'Events from Kubernetes'
requirement_level: required
note: >
Events across different domains may have same `event.name`, yet be
unrelated events.
The name identifies the event and includes a prefixed namespace. The namespace
and name are separated by a period. Events across different namespaces may have
the same name, yet be unrelated events.
examples: ['browser.pointer.click', 'device.exception']