Skip to content
Merged
Changes from all 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
23 changes: 16 additions & 7 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,10 @@ of a JSON serialization, the context attributes and the event data might
both appear within the same JSON object.

### Extension Attributes
CloudEvent producers MAY include additional extension attributes within the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this first sentence (in particular the "MAY") is important. I'm not sure why this section is being reduced.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is removed per comment on duplication with what's newly added in previous section

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree with removing duplicate text but not the normative statements behind them. I would suggest you try to move your new text into this section since they're both about extensions. Then we don't lose any of the normative language but add the clarifications you're looking for.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The normative statements added in the previous generic "context attributes" section applies to extension attributes too since extension attributes are also "context attributes". Putting it into "extension" section adds implicit restriction/assumption that any future attribute will be an extension, which is not right. We can not predict the future and should allow the possibility of some future attribute to be added as standard attribute rather than extension attribute.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@cathyhongzhang there aren't any normative statements in your new text though. By "normative" I mean using RFC2119 keywords.

Putting it into "extension" section adds implicit restriction/assumption that any future attribute will be an extension...

no it doesn't. Any new attribute added to the spec will not be an extension - it won't be since it's spec-defined. All of the attributes you're talking about in your new text are "extensions" because they are not defined by the spec, which is why it makes more sense to put the text into the "extensions" section. Its location in the spec does not change what identity properties people can add, it just make it more readable to put all extensions text into the same location.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with @duglin - and I'm sorry if my review wasn't clear on that. I prefer to merge your proposed text into the extension section.

event. This enables event producers, or middleware, to include additional
metadata that might be used for any purpose in the processing of the
CloudEvent, such as identifying or correlating event sources. See
[CloudEvent Attributes Extensions](primer.md#cloudevent-attribute-extensions)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the last sentence, including this link, should remain.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will add it back to the extension section.

for additional information concerning the use and definition of
extensions.
CloudEvents producers MAY include additional context attributes in the event
that might be used in ancillary actions related to the processing of the event.
See [CloudEvent Attributes Extensions](primer.md#cloudevent-attribute-extensions)
for additional information concerning the use and definition of extensions.

This specification places no restriction on the type or semantics of the
extension attributes. Each definition of an extensions SHOULD fully
Expand All @@ -161,6 +158,18 @@ for extensions that might be of interest.
Each specification that defines how to serialize a CloudEvent will
define how extension attributes will appear.

Here is an example that illustrates the need for additional attributes.
In many IoT and enterprise use cases, an event could be used in
a serverless application that performs actions across multiple types of events.
To support such use cases, the event producer will need to add additional
identity attributes to the "context attributes" which the event consumers can
use to correlate this event with the other events. If such identity attributes
happen to be part of the event "data", the event producer SHOULD also add
the identity attributes to the "context attributes" so that
event consumers can easily access this information without needing to decode
and examine the event data. Such identity attributes can also be used to
help intermediate gateways determine how to route the events.

### eventType
* Type: `String`
* Description: Type of occurrence which has happened. Often this
Expand Down