Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Jul 5, 2023
1 parent ded7a09 commit 211bf76
Show file tree
Hide file tree
Showing 5 changed files with 514 additions and 23 deletions.
82 changes: 82 additions & 0 deletions semantic_conventions/metrics/messaging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
groups:
- id: metric.messaging.attributes
type: attribute_group
brief: "Common messaging metrics attributes."
extends: messaging.attributes.common
attributes:
- ref: messaging.destination.name
requirement_level:
conditionally_required: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated.
- ref: messaging.destination.template
requirement_level:
conditionally_required: if available.
- id: messaging.todo.status
type: string
brief: "The status of the operation: TODO"
requirement_level: required
examples: ["ok", "error", "timeout"]

# duration

- id: metric.messaging.publish.duration
type: metric
metric_name: messaging.publish.duration
brief: "Measures the duration of publish operation."
instrument: histogram
unit: "s"
extends: metric.messaging.attributes

- id: metric.messaging.receive.duration
type: metric
metric_name: messaging.receive.duration
brief: "Measures the duration of receive operation."
instrument: histogram
unit: "s"
extends: metric.messaging.attributes

- id: metric.messaging.deliver.duration
type: metric
metric_name: messaging.deliver.duration
brief: "Measures the duration of deliver operation."
instrument: histogram
unit: "s"
extends: metric.messaging.attributes

- id: metric.messaging.settle.duration
type: metric
metric_name: messaging.settle.duration
brief: "Measures the duration of settle operation."
instrument: histogram
unit: "s"
extends: metric.messaging.attributes
attributes:
- id: messaging.todo_settlement.status
type: string
brief: "The status of the settlement: acknowledged, rejected, TODO"
examples: ["ack", "nack"]

# count

- id: metric.messaging.publish.count
type: metric
metric_name: messaging.published_messages.count
brief: "Measures the number of published messages."
instrument: counter
unit: "message"
extends: metric.messaging.attributes

- id: metric.messaging.receive.count
type: metric
metric_name: messaging.received_messages.count
brief: "Measures the number of received or delivered messages."
instrument: counter
unit: "message"
extends: metric.messaging.attributes

- id: metric.messaging.settle.count
type: metric
metric_name: messaging.settled_messages.count
brief: "Measures the number of settled messages."
instrument: counter
unit: "message"
extends: metric.messaging.attributes
38 changes: 23 additions & 15 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,36 @@ 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
- id: messaging.attributes.common
type: attribute_group
brief: "Common messaging attributes."
prefix: messaging
type: span
brief: >
This document defines general attributes used in
messaging systems.
attributes:
- id: system
type: string
requirement_level: required
brief: 'A string identifying the messaging system.'
examples: ['kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS']
- ref: server.address
requirement_level:
conditionally_required: If available.
- ref: server.port
requirement_level:
conditionally_required: If available.
- ref: server.socket.address
tag: connection-level
- ref: network.protocol.name
examples: ['amqp', 'mqtt']
- ref: network.protocol.version

- id: messaging
prefix: messaging
type: span
brief: >
This document defines general attributes used in
messaging systems.
extends: messaging.attributes.common
attributes:
- id: operation
type:
allow_custom_values: true
Expand Down Expand Up @@ -134,13 +152,6 @@ groups:
- ref: messaging.message.payload_compressed_size_bytes
requirement_level:
recommended: Only if span represents operation on a single message.
- ref: server.address
note: >
This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.
requirement_level:
conditionally_required: If available.
- ref: server.socket.address
tag: connection-level
- ref: server.socket.port
tag: connection-level
- ref: network.transport
Expand All @@ -151,9 +162,6 @@ groups:
tag: connection-level
requirement_level:
recommended: If different than `server.address` and if `server.socket.address` is set.
- ref: network.protocol.name
examples: ['amqp', 'mqtt']
- ref: network.protocol.version

- id: messaging.rabbitmq
prefix: messaging.rabbitmq
Expand Down
Loading

0 comments on commit 211bf76

Please sign in to comment.