Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event.summary as a recommendation for events #1074

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
25 changes: 25 additions & 0 deletions .chloggen/event-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: events

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add a human-readable description as an attribute representing the event

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [ 1076 ]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be event.summary

centralized logging system to display a human-readable representation of the event.
11 changes: 7 additions & 4 deletions docs/attributes-registry/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

Attributes for Events represented using Log Records.

| 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) |
| 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) |

**[1]:** Event names are subject to the same rules as [attribute names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/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.
**[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.

**[2]:** Event names are subject to the same rules as [attribute names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/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.
5 changes: 5 additions & 0 deletions docs/general/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +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) |

**[1]:** Event names are subject to the same rules as [attribute names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/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.




Expand All @@ -69,6 +72,8 @@ 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
alexvanboxel marked this conversation as resolved.
Show resolved Hide resolved
representation of the event.

Recommendations for defining events:

Expand Down
2 changes: 2 additions & 0 deletions model/logs/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ groups:
attributes:
- ref: event.name
requirement_level: required
- ref: event.description
requirement_level: recommended
10 changes: 10 additions & 0 deletions model/registry/event.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ groups:
separation of semantics for events in separate domains like browser, mobile, and
kubernetes.
examples: ['browser.mouse.click', 'device.app.lifecycle']
- id: description
type: string
stability: experimental
brief: >
Human-readable message representing an event.
alexvanboxel marked this conversation as resolved.
Show resolved Hide resolved
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
centralized logging system to display a human-readable representation of the event.
examples: ['User clicked element with id 42', 'Device app lifecycle changed to PAUSED']
Loading