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

Event payload lives in the LogRecord body #566

Merged
merged 26 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c067af4
payload lives in the log body
breedx-splk Nov 30, 2023
ec6f342
lint
breedx-splk Nov 30, 2023
b5c09e4
Merge branch 'main' into event_details
breedx-splk Nov 30, 2023
c030172
Update docs/general/events.md
breedx-splk Nov 30, 2023
62e75e9
Update docs/general/events.md
breedx-splk Nov 30, 2023
edbecae
Update docs/general/events.md
breedx-splk Nov 30, 2023
a550154
Merge branch 'main' into event_details
breedx-splk Nov 30, 2023
347f9f7
code review comments.
breedx-splk Dec 1, 2023
2428de6
update phrasing about name determining schema existence.
breedx-splk Dec 4, 2023
8151456
Merge branch 'main' into event_details
breedx-splk Dec 4, 2023
5b1778a
Merge branch 'main' into event_details
breedx-splk Dec 8, 2023
b22376e
Merge branch 'main' into event_details
breedx-splk Jan 10, 2024
a629620
Merge branch 'main' into event_details
breedx-splk Jan 23, 2024
2c674b8
Merge branch 'main' into event_details
breedx-splk Jan 24, 2024
dcc291d
Merge branch 'main' into event_details
breedx-splk Jan 29, 2024
0963668
Merge branch 'main' into event_details
breedx-splk Jan 30, 2024
1c5ebbd
Merge branch 'main' into event_details
breedx-splk Feb 5, 2024
5bab8a7
make some changelog yaml instead
breedx-splk Feb 5, 2024
3445331
these are ints
breedx-splk Feb 5, 2024
d2a13b5
Merge branch 'main' into event_details
joaopgrassi Feb 6, 2024
874494a
Merge branch 'main' into event_details
arminru Feb 6, 2024
c2c827d
Merge branch 'main' into event_details
breedx-splk Feb 6, 2024
43a13df
Merge branch 'main' into event_details
breedx-splk Feb 6, 2024
cf19d8f
Merge branch 'main' into event_details
breedx-splk Feb 8, 2024
2ed04c8
Merge branch 'main' into event_details
joaopgrassi Feb 9, 2024
ca2a276
Merge branch 'main' into event_details
jsuereth Feb 12, 2024
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
21 changes: 21 additions & 0 deletions .chloggen/event_payload_in_body.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 clarification that the body of an Event will live in the LogRecord body field.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [ 566]

# (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:
30 changes: 26 additions & 4 deletions docs/general/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,35 @@ linkTitle: Events
aliases: [docs/specs/semconv/general/events-general]
--->

# Semantic Conventions for Event Attributes
# Semantic Conventions for Events

**Status**: [Experimental][DocumentStatus]

This document describes the attributes of standalone Events that are represented
This document describes the characteristics of standalone Events that are represented
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved
in the data model by `LogRecord`s.

Semantically, an Event is a named occurrence at an instant in time. It signals that
"this thing happened at this time" and provides additional specifics about the occurrence.
Examples of Events might include things like uncaught exceptions, button clicks, user logout,
network connection severed, etc.

In OpenTelemetry, Events are implemented as a specific type of `LogRecord` that conforms to
the conventions included here, and Events
[have their own API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md).
The API abstracts away knowledge of `LogRecord` so that users only deal with Event
semantics.

In addition to a required name, an Event may contain a _payload_ of any type permitted by the
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved
[LogRecord body](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-body).
In its implementation, the Event _payload_ will constitute the `Body` of the `LogRecord`.
Like all other OpenTelemetry signals, an Event has optional attribute metadata that helps describe
the event context.

Over time, some Events will be specified by OpenTelemetry and will have documented payload structure,
field semantics, and stability and requirement levels. Other events may be user-defined and carry
bespoke user semantics. When an Event name exists in the semantic conventions, its _payload_
structure and semantics will also be defined.
lmolkova marked this conversation as resolved.
Show resolved Hide resolved

breedx-splk marked this conversation as resolved.
Show resolved Hide resolved
The following semantic conventions for events are defined:

* **[General](#general-event-attributes): General semantic attributes that may be used in describing Events.**
Expand All @@ -18,8 +40,8 @@ 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 attribute `event.name` that uniquely identifies the event.
Events with same `event.name` are structurally similar to one another. Events
LogRecords MUST have the attribute `event.name` that uniquely identifies the event.
Events with the same `event.name` are structurally similar to one another. Events
may also have other LogRecord attributes.

When recording events from an existing system as OpenTelemetry Events, it is
Expand Down
Loading