-
Notifications
You must be signed in to change notification settings - Fork 577
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
Propose holistic simplification of source- attributes #129
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,27 +107,19 @@ the event data. The context might also need to be serialized with the event | |
data for some use cases (e.g. a JSON implementation might use one JSON object | ||
that contains both context and data). | ||
|
||
### namespace | ||
* Type: String | ||
* Description: Identifier that uniquely identifies the organization publishing | ||
the event. | ||
* Constraints: | ||
* REQUIRED | ||
* MUST be a non-empty string | ||
* Examples: | ||
* kafka.apache.org | ||
* com.microsoft.azure | ||
|
||
### event-type | ||
* Type: String | ||
* Description: Type of the event `data`. Producers can specify the format of | ||
this, depending on their service. This enables the interpretation of `data`, | ||
and can be used for routing, policy and more. | ||
* Description: Type of occurrence which has happened. The event type MUST be | ||
namespaced with a package based on the reverse-DNS of a domain associated | ||
with the software that produced the event. This MAY be used for routing, | ||
observability, policy enforcement, etc. | ||
* Constraints: | ||
* REQUIRED | ||
* MUST be a non-empty string | ||
* MUST be prefixed with a reverse-DNS name associated with the software that | ||
produces the event | ||
* Examples: | ||
* customer.created | ||
* com.github.pull.create | ||
|
||
### event-type-version | ||
* Type: String | ||
|
@@ -146,32 +138,46 @@ that contains both context and data). | |
* REQUIRED | ||
* MUST be a non-empty string | ||
|
||
### source | ||
* Type: Object | ||
* Description: This describes the software instance that emits the event at | ||
runtime (i.e. the producer). It contains sub-properties (listed below) | ||
* Constraints: | ||
* REQUIRED | ||
* MUST contain at least one non-empty sub-property. | ||
|
||
### source-type | ||
### source-authority | ||
* Type: String | ||
* Description: Type of the event source. Providers define list of event | ||
sources. | ||
* Description: The URI authority component of the source software. | ||
* Constraints: | ||
* REQUIRED | ||
* MUST be a non-empty string | ||
* MUST conform to the | ||
["authority" component](https://tools.ietf.org/html/rfc3986#section-3.2) | ||
of the URI spec | ||
* Examples: | ||
* s3 | ||
* github.com | ||
* myenterpriseGitHubInstall.company.com | ||
|
||
### source-id | ||
* Type: String | ||
* Description: ID of the event source. | ||
### source-path | ||
* Type: string | ||
* Description: The URI path component of the resource that emitted an event. | ||
* Constraints: | ||
* REQUIRED | ||
* MUST be a non-empty string | ||
* OPTIONAL | ||
* If present, MUST conform to the "path-rootless" grammar of the | ||
[URI spec](https://tools.ietf.org/html/rfc3986#section-3.3) | ||
* Examples: | ||
* my.s3.bucket | ||
* myorg/myrepo | ||
* my/long/ftp/path.jpg | ||
|
||
### source-labels | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do they refer to the "properties" of the source? Is it TRUE that different event source types could have different source-labels? Are we going to leave the definition of source-labels to event producers? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I proposed The labels that I'm used to interacting with are under the developer's control, though the developer's software might automatically manage some labels with the developer's credentials. Some examples I've used in the past:
You seem to know dramatically more about IoT and can interpret how the label concept would apply there. It seems totally reasonable to me that the user portal for managing devices would manage labels on those devices. It's also true that there could be a bit of disconnect originally from vendors that they use different label names to refer to similar concepts. Personally, I think this problem will be smaller in practice than deciding that every IoT device can only be correlated by one property. |
||
* Type: Map <String, String> | ||
* Description: Labels associated with the resource that emitted the event. | ||
This allows filtering or routing based on non-hierarchical source metadata. | ||
This is intended to include (but is not limited to) "labels" in cloud | ||
platforms like AWS or Kubernetes. | ||
* Constraints: | ||
* OPTIONAL | ||
* Keys MUST match the regular expression `[_.a-z0-9]+` | ||
* Keys SHOULD use the character "." is as namespace separator | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leave out "is" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whoops. This is what happens when I copy+paste from other standards. |
||
* Values MUST use URI-safe characters | ||
* Examples: | ||
* { | ||
"sensor.configuration": "WINDOW" | ||
"sensor.location": "deployments/house1/window3" | ||
} | ||
|
||
### event-id | ||
* Type: String | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicking:
com.github.pull.create
reads as a command rather than an event that took place.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: github docs use "create" for a notification that something has been created... not that we need to conform to some specific vendor. We could include a few divergent examples to be clear that we're not mandating anything or consider some guidance about naming if someone wants to see if there's a trend in existing implementations or other spec we want to borrow from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree this is a nit, and suggest it could be addressed in a follow-on PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a consumer of an event, "event-type", to me, denotes whether it is a storage event or an messaging event or a timer event , etc. Then depending on the type of event, it could have different properties. For example, a storage event could have properties like "bucket name", "action performed on that bucket (created or update or delete)", a messaging event could have properties like "topic of the message".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SeanFeldman I lean 20% more towards infinitive tense for a few reasons:
onClick
rather thanonClicked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First scenario is describing a permision, not an event. Permission to create a PR.
Second example is historical
OnClick
as an event handler for theclick
event. You'd not call it "WhenClick", but rather "WhenClicked" if that would be the convention back in the day.I might remain in the minority with my belief that an event is a manifistation of something immutable that happened and therefore should be described in the past tense 🙂