Skip to content
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 messaging.source.* attributes #100

Merged
merged 14 commits into from
Jun 29, 2023
Merged
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ release.
([#55](https://github.com/open-telemetry/semantic-conventions/pull/55))
- Split out sections for proposed stable JVM metrics and experimental JVM metrics.
([#56](https://github.com/open-telemetry/semantic-conventions/pull/56))
- BREAKING: Remove `messaging.source.*` attributes.
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
([#100](https://github.com/open-telemetry/semantic-conventions/pull/100))
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.
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
- 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
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
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