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

move event attributes to the registry #543

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 docs/attributes-registry/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Events
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be events or event?

aliases: [docs/specs/semconv/general/events-general]
--->

# Semantic Conventions for Event Attributes

<!-- semconv registry.event -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `event.domain` | string | The domain identifies the business context for the events. [1] | `browser` | Recommended |
| `event.name` | string | The name identifies the event. | `click`; `exception` | Recommended |

**[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.

| Value | Description |
|---|---|
| `browser` | Events from browser apps |
| `device` | Events from mobile apps |
| `k8s` | Events from Kubernetes |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
12 changes: 2 additions & 10 deletions docs/general/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,10 @@ 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.domain`](../attributes-registry/events.md) | string | The domain identifies the business context for the events. [1] | `browser` | Required |
| [`event.name`](../attributes-registry/events.md) | string | The name identifies the event. | `click`; `exception` | Required |

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

Copy link
Member

Choose a reason for hiding this comment

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

Please render the table with full (check other examples) so we don't loose the enum table values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as event.domain has been removed it looks like we don't need the full render anymore

`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.

| Value | Description |
|---|---|
| `browser` | Events from browser apps |
| `device` | Events from mobile apps |
| `k8s` | Events from Kubernetes |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
25 changes: 2 additions & 23 deletions model/logs/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,7 @@ groups:
brief: >
This document defines attributes for Events represented using Log Records.
attributes:
- id: name
type: string
- ref: event.name
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'
- ref: event.domain
requirement_level: required
note: >
Events across different domains may have same `event.name`, yet be
unrelated events.
30 changes: 30 additions & 0 deletions model/registry/events.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
groups:
- id: registry.event
type: attribute_group
prefix: event
brief: >
This document defines attributes for Events represented using Log Records.
attributes:
- id: name
type: string
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'
note: >
Events across different domains may have same `event.name`, yet be
unrelated events.
Loading