Skip to content

Commit

Permalink
Messaging: Remove messaging.source.* attributes (#100)
Browse files Browse the repository at this point in the history
Co-authored-by: Armin Ruech <[email protected]>
  • Loading branch information
joaopgrassi and arminru authored Jun 29, 2023
1 parent c383883 commit 8643596
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 206 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ Note: This is the first release of Semantic Conventions separate from the Specif
([#106](https://github.com/open-telemetry/semantic-conventions/pull/106))
- Mark initial set of HTTP semantic conventions as frozen
([#105](https://github.com/open-telemetry/semantic-conventions/pull/105))
- BREAKING: Remove `messaging.source.*` attributes and use `messaging.destination.*`
attributes on producer and consumer to describe messaging queue or topic.
([#100](https://github.com/open-telemetry/semantic-conventions/pull/100))
- Mark `process.runtime.jvm.system.cpu.load_1m` and `process.runtime.jvm.system.cpu.utilization` metrics as opt-in.
([#57](https://github.com/open-telemetry/semantic-conventions/pull/57))
- Add container `image.id`, `command`, `command_line` and `command_args` resource attributes.
Expand Down
129 changes: 23 additions & 106 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ groups:
brief: 'Semantic convention describing per-message attributes populated on messaging spans or links.'
attributes:
- ref: messaging.destination.name
- ref: messaging.source.name
- id: message.id
type: string
brief: 'A value used by the messaging system as an identifier for the message, represented as a string.'
Expand All @@ -31,6 +30,15 @@ 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 spans
describing messaging operations.
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.
In other cases, destination attributes may be set on links.
attributes:
- id: name
type: string
Expand All @@ -56,35 +64,6 @@ 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
type: attribute_group
brief: 'Semantic convention for attributes that describe messaging source on broker'
attributes:
- id: name
type: string
brief: 'The message source name'
note: |
Source name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If
the broker does not have such notion, the source name SHOULD uniquely identify the broker.
examples: ['MyQueue', 'MyTopic']
- id: template
type: string
brief: 'Low cardinality representation of the messaging source name'
examples: ['/customers/{customerId}']
note: >
Source names could be constructed from templates.
An example would be a source name involving a user name or product id.
Although the source name in this case is of high cardinality,
the underlying template is of low cardinality and can be effectively
used for grouping and aggregation.
- id: temporary
type: boolean
brief: 'A boolean that is true if the message source is temporary and might not exist anymore after messages are processed.'
- id: anonymous
type: boolean
brief: 'A boolean that is true if the message source is anonymous (could be unnamed or have auto-generated name).'

- id: messaging
prefix: messaging
type: span
Expand Down Expand Up @@ -129,6 +108,20 @@ groups:
brief: >
A unique identifier for the client that consumes or produces a message.
examples: ['client-5', 'myhost@8742@s8083jm']
- ref: messaging.destination.name
requirement_level:
conditionally_required: If span describes operation on a single message or if the value applies to all messages in the batch.
- ref: messaging.destination.template
requirement_level:
conditionally_required: >
If available. Instrumentations MUST NOT use `messaging.destination.name` as template
unless low-cardinality of destination name is guaranteed.
- ref: messaging.destination.temporary
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.
- ref: messaging.destination.anonymous
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.
- ref: messaging.message.id
requirement_level:
recommended: Only for spans that represent an operation on a single message.
Expand Down Expand Up @@ -162,77 +155,6 @@ groups:
examples: ['amqp', 'mqtt']
- ref: network.protocol.version

- id: messaging.producer
prefix: messaging
type: span
extends: messaging
span_kind: producer
brief: 'Semantic convention for producers of messages sent to a messaging systems.'
attributes:
- ref: messaging.destination.name
requirement_level:
conditionally_required: If one message is being published or if the value applies to all messages in the batch.
- ref: messaging.destination.template
requirement_level:
conditionally_required: >
If available. Instrumentations MUST NOT use `messaging.destination.name` as template
unless low-cardinality of destination name is guaranteed.
- ref: messaging.destination.temporary
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.
- ref: messaging.destination.anonymous
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.

- id: messaging.producer.synchronous
prefix: messaging
type: span
extends: messaging
span_kind: client
brief: >
Semantic convention for clients of messaging systems that produce messages
and synchronously wait for responses.
- id: messaging.consumer
prefix: messaging
type: span
extends: messaging
span_kind: consumer
brief: 'Semantic convention for a consumer of messages received from a messaging system'
attributes:
- ref: messaging.source.name
requirement_level:
conditionally_required: If the value applies to all messages in the batch.
- ref: messaging.source.template
requirement_level:
conditionally_required: >
If available. Instrumentations MUST NOT use `messaging.source.name` as template
unless low-cardinality of source name is guaranteed.
- ref: messaging.source.temporary
requirement_level:
recommended: When supported by messaging system and only if the source is temporary. When missing, the value is assumed to be `false`.
- ref: messaging.source.anonymous
requirement_level:
recommended: When supported by messaging system and only if the source is anonymous. When missing, the value is assumed to be `false`.
- ref: messaging.destination.name
requirement_level:
recommended: If known on consumer
- ref: messaging.destination.temporary
requirement_level:
recommended: If known on consumer
- ref: messaging.destination.anonymous
requirement_level:
recommended: If known on consumer

- id: messaging.consumer.synchronous
prefix: messaging
type: span
extends: messaging.consumer
span_kind: server
brief: >
Semantic convention for servers that consume messages received from messaging systems
and always send back replies directed to the producers of these messages.
- id: messaging.rabbitmq
prefix: messaging.rabbitmq
type: attribute_group
Expand Down Expand Up @@ -276,11 +198,6 @@ groups:
brief: >
Partition the message is sent to.
examples: 2
- id: source.partition
type: int
brief: >
Partition the message is received from.
examples: 2
- id: message.offset
type: int
brief: >
Expand Down
Loading

0 comments on commit 8643596

Please sign in to comment.