-
Notifications
You must be signed in to change notification settings - Fork 893
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
Messaging: remove source to better align with ECS #3450
Conversation
brief: 'Semantic convention for attributes that describe messaging source on broker' | ||
brief: > | ||
Semantic convention for attributes that describe destination messages were originally published to. | ||
These attributes should be used on the consumer side when original destination is available and different than destination message are consumed 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.
Maybe you could add some clarification the "original destination" refers to the destination the message was originally published to?
messaging.source.name: messaging.destination.name | ||
messaging.source.template: messaging.destination.template | ||
messaging.source.temporary: messaging.destination.temporary | ||
messaging.source.anonymous: messaging.destination.anonymous |
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 just a nit, but I wonder what the desired outcome would be in case both messaging.source.*
and messaging.destination.*
attributes were specified on consumer side.
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.
We will remove these from here right? From what I remember from our last SIG meeting.
messaging.source.name: messaging.destination.name | ||
messaging.source.template: messaging.destination.template | ||
messaging.source.temporary: messaging.destination.temporary | ||
messaging.source.anonymous: messaging.destination.anonymous |
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.
We will remove these from here right? From what I remember from our last SIG meeting.
@@ -31,6 +31,10 @@ groups: | |||
prefix: messaging.destination | |||
type: attribute_group | |||
brief: 'Semantic convention for attributes that describe messaging destination on broker' | |||
note: > | |||
Destination attributes SHOULD be set on publish, receive, or other span describing messaging messaging operation |
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.
Destination attributes SHOULD be set on publish, receive, or other span describing messaging messaging operation | |
Destination attributes SHOULD be set on publish, receive, or other spans describing messaging operations. |
@@ -31,6 +31,10 @@ groups: | |||
prefix: messaging.destination | |||
type: attribute_group | |||
brief: 'Semantic convention for attributes that describe messaging destination on broker' | |||
note: > | |||
Destination attributes SHOULD be set on publish, receive, or other span describing messaging messaging operation | |||
if it operates with single message or if the attribute value applies to all messages in the batch. |
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.
if it operates with single message or if the attribute value applies to all messages in the batch. | |
Destination attributes should be set when the messaging operation handles single messages. When the operation handles a batch of messages, the destination attributes should only be applied when the attribute value applies to all messages in the batch. |
I feel this sentence was "merged" together with the above, so it was a bit confusing. I tried separating then so they can be read completely separately.
I'm not sure about the should
here, so I left it non-normative.
|
||
A destination is usually uniquely identified by name within the messaging system instance. Examples of a destination name would be a URL or a simple one-word identifier. | ||
Sending messages to a destination is called "*publish*" in context of this specification. | ||
A destination represents an entity within messaging system messages are published to and consumed from. A destination |
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.
I can't put my finger on it, but I find hard to understand the sentence. Here's some attempts I tried.. (not sure it's better)
A destination represents an entity within messaging system messages are published to and consumed from. A destination | |
A destination represents an entity within a messaging system. Messages are published to and consumed from a destination. |
OR
A destination represents an entity within messaging system messages are published to and consumed from. A destination | |
A destination represents an entity within a messaging system. A destination can act as a producer or a consumer. |
|
||
> Note: Consumer spans can have attributes describing source and destination. Since messages could be routed by brokers, source and destination don't always match. If original destination information is available on the consumer, consumer instrumentations SHOULD populate corresponding `messaging.destination` attributes. | ||
> Note: Messages could be routed by brokers, destination a message is consumed from doesn't always match the destination it was published to. If original destination information is available on the consumer side, consumer instrumentations SHOULD populate information about original destination on `messaging.destination_original` attributes. |
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: Messages could be routed by brokers, destination a message is consumed from doesn't always match the destination it was published to. If original destination information is available on the consumer side, consumer instrumentations SHOULD populate information about original destination on `messaging.destination_original` attributes. | |
> Note: Because messages could be routed by brokers, the destination a message is consumed from does not always match the destination it was published to. If information about the original destination is available on the consumer side, consumer instrumentations SHOULD populate the attributes about the original destination under the `messaging.destination_original` namespace. |
| `messaging.message.payload_compressed_size_bytes` | int | The compressed size of the message payload in bytes. | `2048` | Recommended: [6] | | ||
| `messaging.message.payload_size_bytes` | int | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | `2738` | Recommended: [7] | | ||
| [`net.peer.name`](span-general.md) | string | Logical remote hostname, see note below. [8] | `example.com` | Conditionally Required: If available. | | ||
| `messaging.destination.anonymous` | boolean | A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). | | Conditionally Required: [4] | |
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.
Nit: Could we add the destination.*
attributes after we are done with all the attributes under message.
? I find it a bit hard to read and follow them when they are mixed like that. Another plus would be the diff here doesn't change much :)
@@ -56,34 +60,40 @@ groups: | |||
type: boolean | |||
brief: 'A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).' | |||
|
|||
- id: messaging.source | |||
prefix: messaging.source | |||
- id: messaging.destination_original |
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.
Hum, for some reason I thought we would just get rid of the "source" concept entirely and not just rename it. Don't we need then to change the schema file to redirect to messaging.destination_original
then?
@lmolkova heads up - most likely this PR will be closed, and we'll ask you to resubmit the PR in a new repo, please refer to #3474 (comment). |
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.
Please move to https://github.com/open-telemetry/semantic-conventions
closing and will reopen in https://github.com/open-telemetry/semantic-conventions repo |
Fixes #3196
Changes
messaging.source
namespace.Destination
andsource
namespaces are defined in ECS and unrelated to messaging. Removed to allow attribute reuse across signals (e.g. logs), to decrease confusion with ECS source, and resolve some usability issues with source/destinationmessaging.destination
because it's widely used in messagingdestination_original
: in some cases when a message is routed, consumer also knows the original destination and the destination it received a message from. Withmessaging.source
removed, we need another namespace for the original destination.