Skip to content

Commit

Permalink
Add more clarity on the purpose of summary
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvanboxel committed Jun 10, 2024
1 parent 0f1a43c commit 1952be4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
13 changes: 7 additions & 6 deletions docs/attributes-registry/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

Attributes for Events represented using Log Records.

| Attribute | Type | Description | Examples | Stability |
| ------------------- | ------ | ------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `event.description` | string | Human-readable message representing an event. [1] | `User clicked element with id 42`; `Device app lifecycle changed to PAUSED` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `event.name` | string | Identifies the class / type of event. [2] | `browser.mouse.click`; `device.app.lifecycle` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| Attribute | Type | Description | Examples | Stability |
| --------------- | ------ | ------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `event.name` | string | Identifies the class / type of event. [1] | `browser.mouse.click`; `device.app.lifecycle` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `event.summary` | string | Human-readable summary representing an event. [2] | `User clicked element with id 42`; `Device app lifecycle changed to PAUSED` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** Events are identified by an `event.name` and a set of attributes and fields in the body that carry specific meaning. However, since these events will be combined with other logs, `event.description` allows a centralized logging system to display a human-readable representation of the event.
**[1]:** Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes.

**[2]:** Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes.
**[2]:** Events are identified by an `event.name` and a set of attributes and fields in the body that carry specific meaning. However, since these events will be combined with other logs, `event.summary` allows a centralized logging system to display a human-readable representation of the event.
When summaries are generated, they are not expected to include every attribute and field that is part of the event but could contain those that are meaningful for a human operator when visually navigating a centralized log system. Instrumentation libraries that produce events defined within the standard OpenTelemetry are not expected to add an `event.summary` attribute, as these are well-known events.
7 changes: 4 additions & 3 deletions docs/general/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ structure and semantics will also be defined.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`event.name`](/docs/attributes-registry/event.md) | string | Identifies the class / type of event. [1] | `browser.mouse.click`; `device.app.lifecycle` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`event.description`](/docs/attributes-registry/event.md) | string | Human-readable message representing an event. [2] | `User clicked element with id 42`; `Device app lifecycle changed to PAUSED` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`event.summary`](/docs/attributes-registry/event.md) | string | Human-readable summary representing an event. [2] | `User clicked element with id 42`; `Device app lifecycle changed to PAUSED` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes.

**[2]:** Events are identified by an `event.name` and a set of attributes and fields in the body that carry specific meaning. However, since these events will be combined with other logs, `event.description` allows a centralized logging system to display a human-readable representation of the event.
**[2]:** Events are identified by an `event.name` and a set of attributes and fields in the body that carry specific meaning. However, since these events will be combined with other logs, `event.summary` allows a centralized logging system to display a human-readable representation of the event.
When summaries are generated, they are not expected to include every attribute and field that is part of the event but could contain those that are meaningful for a human operator when visually navigating a centralized log system. Instrumentation libraries that produce events defined within the standard OpenTelemetry are not expected to add an `event.summary` attribute, as these are well-known events.



Expand All @@ -72,7 +73,7 @@ structure and semantics will also be defined.
and the semantic conventions will define the expected structure of the _payload_
(data) for the event.
* The _payload_ (data) SHOULD be used to represent the structure of the event.
* The event MAY have an `event.message` attribute that is a human-readable
* The event MAY have an `event.summary` attribute that is a human-readable
representation of the event.

Recommendations for defining events:
Expand Down
2 changes: 1 addition & 1 deletion model/logs/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ groups:
attributes:
- ref: event.name
requirement_level: required
- ref: event.description
- ref: event.summary
requirement_level: recommended
11 changes: 8 additions & 3 deletions model/registry/event.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ groups:
separation of semantics for events in separate domains like browser, mobile, and
kubernetes.
examples: ['browser.mouse.click', 'device.app.lifecycle']
- id: description
- id: summary
type: string
stability: experimental
brief: >
Human-readable message representing an event.
Human-readable summary representing an event.
note: >
Events are identified by an `event.name` and a set of attributes and fields in the body that carry specific
meaning. However, since these events will be combined with other logs, `event.description` allows a
meaning. However, since these events will be combined with other logs, `event.summary` allows a
centralized logging system to display a human-readable representation of the event.

Check failure on line 28 in model/registry/event.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[trailing-spaces] trailing spaces
When summaries are generated, they are not expected to include every attribute and field that is part of the
event but could contain those that are meaningful for a human operator when visually navigating a centralized
log system. Instrumentation libraries that produce events defined within the standard OpenTelemetry are not
expected to add an `event.summary` attribute, as these are well-known events.
examples: ['User clicked element with id 42', 'Device app lifecycle changed to PAUSED']

0 comments on commit 1952be4

Please sign in to comment.