-
Notifications
You must be signed in to change notification settings - Fork 894
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
Common event attribute names #397
Changes from 10 commits
d7834fe
c77a664
89729ad
ccfcd27
27e93e8
f177ad2
94cfd25
86a1479
824d777
c54869d
c3aeebf
df0d8ba
02e7bd0
a42d217
148d2fd
a5c59ac
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Semantic conventions for events | ||
|
||
Event types are identified by the event name. Library and application implementors | ||
are free to define any event name that make sense with the exception of the | ||
following reserved names. | ||
|
||
## Reserved event names | ||
|
||
| Event name | Notes and examples | | ||
| :---------- | :----------------------------------------------------------------- | | ||
| `"message"` | Event with the details of a single message within a span. | | ||
|
||
## Message event attributes | ||
|
||
Event `"name"` MUST be `"message"`. | ||
|
||
Message events MUST be associated with a tracing span. | ||
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 feel there needs to be some guidance as to when we add these attributes on an event vs on a span. It's fine to say that they should always be an event, even when the span only have one "event" such as an http request. 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. Yes we should always use them as event attributes even though we know only one event can occur per Span. |
||
|
||
| Attribute name | Notes and examples | Required? | | ||
| :------------- | :------------------------------------- | --------- | | ||
| `message.type` | Either `"SENT"` or `"RECEIVED"`. | Yes | | ||
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. should it be boolean or more types are expected? |
||
| `message.id` | Incremented integer value within the parent span starting with `1`. | Yes | | ||
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. This describes the format, but not the semantic meaning at all. "An incremented integer value" doesn't describe what the attribute is actually telling me. 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 added paragraph on meaning. 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. Suggestion: maybe just specify these as opaque identifiers? |
||
| `message.compressed_size` | Compressed size in bytes. | No | | ||
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. is it always known that the message was compressed? Perhaps |
||
| `message.uncompressed_size` | Uncompressed size in bytes. | No | | ||
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. just as an idea, maybe we should think about a bit shorter names :) if you have any suggestion I would be happy to hear :) 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. You don't really need the word "uncompressed" in my opinion.
|
||
| `message.content` | The body or main contents of the message. If binary, then message should be Base64 encoded. | No | | ||
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. should there be an attribute for the metadata/headers? May be more valuable than the content of the message and cheaper to collect. |
||
|
||
The `message.id` MUST be calculated as two different counters starting from `1` | ||
one for sent messages and one for received message. This way we guarantee that | ||
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. Three different uses of one/1 in this sentence, which refer to message id and types of message ids are confusing. I would go with something along the lines of:
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. Fixed |
||
the values will be consistent between different implementations. In case of | ||
unary calls only one sent and one received message will be recorded for both | ||
client and server spans. | ||
|
||
Most exporters will likely drop the `message.content` attribute if present. | ||
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. Most exporters will likely not drop 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 could see 3 levels of attribute:
The default tracer would keep recommended and required, a low-bandwidth tracer could drop all except required, and an enhanced attributes tracer could keep all attributes. 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. Additionally there would need to be some database that the exporter can consult to determine in which category an attribute falls. 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. And a way (another use for named tracer?) to tell the tracer which "mode" to operate in. 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 think the use case of the logging exporter shows that this is a configuration you want to do on the exporter level (logging exporter: all, Jaeger exporter: normal, for example). 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. Tangentially, it makes me wonder why we don't have an API to declare keys with metadata like a description, some kind of priority as discussed here, potentially type information, as well as a clearly stated namespace. |
||
However, logging-only exporters will likely want to log it as this information | ||
is highly useful during the early stages of developing a new application. |
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.
This is missing a description of what a
message
event is even supposed to describe, i.e. when should I addmessage
events to my span.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.
@arminru 29 days ago:
@kbrockhoff please help :-)