Skip to content

Commit be0cae0

Browse files
Add messaging semantic conventions for settlement spans (#661)
Co-authored-by: Joao Grassi <joao.grassi@dynatrace.com>
1 parent 2ff370d commit be0cae0

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.chloggen/661.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: messaging
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Add messaging semantic conventions for settlement spans
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [621]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/messaging/messaging-spans.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,19 @@ If the destination name is dynamic, such as a [conversation ID](#conversations)
184184
In these cases, an artificial destination name that best expresses the destination, or a generic, static fallback like `"(anonymous)"` for [anonymous destinations](#temporary-and-anonymous-destinations) SHOULD be used instead.
185185

186186
The values allowed for `<operation name>` are defined in the section [Operation names](#operation-names) below.
187-
If the format above is used, the operation name MUST match the `messaging.operation` attribute defined for message consumer spans below.
188187

189188
Examples:
190189

191190
* `shop.orders publish`
192191
* `shop.orders receive`
193-
* `shop.orders process`
192+
* `shop.orders settle`
194193
* `print_jobs publish`
195-
* `topic with spaces process`
196-
* `AuthenticationRequest-Conversations process`
194+
* `topic with spaces deliver`
195+
* `AuthenticationRequest-Conversations settle`
197196
* `(anonymous) publish` (`(anonymous)` being a stable identifier for an unnamed destination)
198197

198+
Messaging system specific adaptions to span naming MUST be documented in [semantic conventions for specific messaging technologies](#semantic-conventions-for-specific-messaging-technologies).
199+
199200
### Operation names
200201

201202
The following operations related to messages are defined for these semantic conventions:
@@ -206,6 +207,7 @@ The following operations related to messages are defined for these semantic conv
206207
| `create` | A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios. |
207208
| `receive` | One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. |
208209
| `deliver` | One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs. |
210+
| `settle` | One or more messages are settled. |
209211

210212
### Span kind
211213

@@ -269,6 +271,12 @@ batch of messages, or for no message at all (if it is signalled that no
269271
messages were received). For each message it accounts for, the "Deliver" or
270272
"Receive" span SHOULD link to the message's creation context.
271273

274+
"Settle" spans SHOULD be created for every manually or automatically triggered
275+
settlement operation. A single "Settle" span can account for a single message
276+
or for multiple messages (in case messages are passed for settling as batches).
277+
For each message it accounts for, the "Settle" span MAY link to the creation
278+
context of the message.
279+
272280
## Messaging attributes
273281

274282
Messaging attributes are organized into the following namespaces:

0 commit comments

Comments
 (0)