Skip to content

Commit

Permalink
[chore] Move CloudEvents attributes to the registry (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Mar 27, 2024
1 parent 0941ebb commit f8f1e16
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ body:
- area:browser
- area:client
- area:cloud
- area:cloudevents
- area:code
- area:container
- area:db
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ body:
- area:browser
- area:client
- area:cloud
- area:cloudevents
- area:code
- area:container
- area:db
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ body:
- area:browser
- area:client
- area:cloud
- area:cloudevents
- area:code
- area:container
- area:db
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Currently, the following namespaces exist:
* [Browser](browser.md)
* [Client](client.md)
* [Cloud](cloud.md)
* [CloudEvents](cloudevents.md)
* [Code](code.md)
* [Container](container.md)
* [DB](db.md) (database)
Expand Down
16 changes: 16 additions & 0 deletions docs/attributes-registry/cloudevents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# CloudEvents

## CloudEvents Attributes

<!-- semconv registry.cloudevents(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `cloudevents.event_id` | string | The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. | `123e4567-e89b-12d3-a456-426614174000`; `0001` |
| `cloudevents.event_source` | string | The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. | `https://github.com/cloudevents`; `/cloudevents/spec/pull/123`; `my-service` |
| `cloudevents.event_spec_version` | string | The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. | `1.0` |
| `cloudevents.event_subject` | string | The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). | `mynewfile.jpg` |
| `cloudevents.event_type` | string | The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. | `com.github.pull_request.opened`; `com.example.object.deleted.v2` |
<!-- endsemconv -->
10 changes: 5 additions & 5 deletions docs/cloudevents/cloudevents-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ The following attributes are applicable to creation and processing Spans.
<!-- semconv cloudevents -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `cloudevents.event_id` | string | The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. | `123e4567-e89b-12d3-a456-426614174000`; `0001` | Required |
| `cloudevents.event_source` | string | The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. | `https://github.com/cloudevents`; `/cloudevents/spec/pull/123`; `my-service` | Required |
| `cloudevents.event_spec_version` | string | The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. | `1.0` | Recommended |
| `cloudevents.event_subject` | string | The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). | `mynewfile.jpg` | Recommended |
| `cloudevents.event_type` | string | The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. | `com.github.pull_request.opened`; `com.example.object.deleted.v2` | Recommended |
| [`cloudevents.event_id`](../attributes-registry/cloudevents.md) | string | The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. | `123e4567-e89b-12d3-a456-426614174000`; `0001` | Required |
| [`cloudevents.event_source`](../attributes-registry/cloudevents.md) | string | The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. | `https://github.com/cloudevents`; `/cloudevents/spec/pull/123`; `my-service` | Required |
| [`cloudevents.event_spec_version`](../attributes-registry/cloudevents.md) | string | The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. | `1.0` | Recommended |
| [`cloudevents.event_subject`](../attributes-registry/cloudevents.md) | string | The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). | `mynewfile.jpg` | Recommended |
| [`cloudevents.event_type`](../attributes-registry/cloudevents.md) | string | The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. | `com.github.pull_request.opened`; `com.example.object.deleted.v2` | Recommended |
<!-- endsemconv -->
<!-- prettier-ignore-end -->

Expand Down
37 changes: 37 additions & 0 deletions model/registry/cloudevents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
groups:
- id: registry.cloudevents
prefix: cloudevents
type: attribute_group
brief: >
This document defines attributes for CloudEvents.
attributes:
- id: event_id
type: string
stability: experimental
brief: >
The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.
examples: ['123e4567-e89b-12d3-a456-426614174000', '0001']
- id: event_source
type: string
stability: experimental
brief: >
The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.
examples: ['https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my-service' ]
- id: event_spec_version
type: string
stability: experimental
brief: >
The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.
examples: '1.0'
- id: event_type
type: string
stability: experimental
brief: >
The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence.
examples: ['com.github.pull_request.opened', 'com.example.object.deleted.v2']
- id: event_subject
type: string
stability: experimental
brief: >
The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source).
examples: 'mynewfile.jpg'
39 changes: 8 additions & 31 deletions model/trace/cloudevents.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
groups:
- id: cloudevents
prefix: cloudevents
type: span
brief: >
This document defines attributes for CloudEvents.
CloudEvents is a specification on how to define event data in a standard way.
These attributes can be attached to spans when performing operations with CloudEvents, regardless of the protocol being used.
attributes:
- id: event_id
type: string
stability: experimental
- ref: cloudevents.event_id
requirement_level: required
brief: >
The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.
examples: ['123e4567-e89b-12d3-a456-426614174000', '0001']
- id: event_source
type: string
stability: experimental
- ref: cloudevents.event_source
requirement_level: required
brief: >
The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.
examples: ['https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my-service' ]
- id: event_spec_version
type: string
stability: experimental
brief: >
The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.
examples: '1.0'
- id: event_type
type: string
stability: experimental
brief: >
The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence.
examples: ['com.github.pull_request.opened', 'com.example.object.deleted.v2']
- id: event_subject
type: string
stability: experimental
brief: >
The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source).
examples: 'mynewfile.jpg'
- ref: cloudevents.event_spec_version
requirement_level: recommended
- ref: cloudevents.event_type
requirement_level: recommended
- ref: cloudevents.event_subject
requirement_level: recommended

0 comments on commit f8f1e16

Please sign in to comment.