diff --git a/spec.md b/spec.md index 7e0a43013..fb9154969 100644 --- a/spec.md +++ b/spec.md @@ -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 -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) -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 @@ -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