Skip to content

Commit

Permalink
Messaging: Clarify {destination} value used on span name (#1635)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Dec 13, 2024
1 parent abd92c1 commit e2227c6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .chloggen/clarify-temporary-destination.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
change_type: enhancement
component: messaging
note: Further clarify `{destination}` value on span names
issues: [1635]
subtext:
13 changes: 9 additions & 4 deletions docs/messaging/messaging-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,24 @@ Messaging spans SHOULD follow the overall [guidelines for span names](https://gi

<!-- markdown-link-check-disable -->
<!-- HTML anchors are not supported https://github.com/tcort/markdown-link-check/issues/225-->
The **span name** SHOULD be `{messaging.operation.name} {destination}` (see below for the exact definition of the [`{destination}`](#destination-placeholder) placeholder).
The **span name** SHOULD be `{messaging.operation.name} {destination}`
(see below for the exact definition of the [`{destination}`](#destination-placeholder) placeholder).
<!-- markdown-link-check-enable -->

Semantic conventions for individual messaging systems MAY specify different span name format and then MUST document it in semantic conventions for specific messaging technologies.
Semantic conventions for individual messaging systems MAY specify different
span name format and then MUST document it in semantic conventions
for specific messaging technologies.

The <span id="destination-placeholder">`{destination}`</span> SHOULD describe the entity that the operation is performed against
The <span id="destination-placeholder">`{destination}`</span>
SHOULD describe the entity that the operation is performed against
and SHOULD adhere to one of the following values, provided they are accessible:

1. `messaging.destination.template` SHOULD be used when it is available.
2. `messaging.destination.name` SHOULD be used when the destination is known to be neither [temporary nor anonymous](#temporary-and-anonymous-destinations).
3. `server.address:server.port` SHOULD be used only for operations not targeting any specific destination(s).

If a corresponding `{destination}` value is not available for a specific operation, the instrumentation SHOULD omit the `{destination}`.
If a (low-cardinality) corresponding `{destination}` value is not available for
a specific operation, the instrumentation SHOULD omit the `{destination}`.

Examples:

Expand Down

0 comments on commit e2227c6

Please sign in to comment.