open-telemetry / semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Apache License 2.0
272 stars 174 forks source link

Add attributes defining the settlement intent for messaging #431

Open pyohannes opened 1 year ago

pyohannes commented 1 year ago

Relates to open-telemetry/semantic-conventions#1162

A settlement operation for messages can be triggered with different objectives, e. g.:

This settlement intent is important for interpreting traces and should be visible as an attribute on settlement spans and possibly also in the span name for settlement spans.

pyohannes commented 1 year ago

As a first step we'll collect information about what "settlement intents" different messaging systems support.

cc @lmolkova @joaopgrassi

michaelklishin commented 1 year ago

As someone who works on a data service that supports five different protocols, I'm inclined to suggest something very generic:

This way any messaging system or protocol would be able to provide some context (e.g. "rejected to be requeued" or "rejected to be discarded" or "rejected for dead lettering" or "rejected as a poison message").

Finding a common denominator between all the reasonably popular messaging and streaming protocols can be harder than it sounds.

Just my 2ç.

stebet commented 1 year ago

This feels to me like it should be handled very similar to http.response.status_code and set on deliver/receive spans. messaging.message.delivery_status = ack/nack?

lmolkova commented 1 year ago

Settlement is an individual operation (a network call) and should be expressed as a span. Receive/delivery are not guaranteed to last until settlement happens.

We have different terminology:

Option 1: we can come up with a generic terminology (that's helpful for one or two, but not other systems) Option 2:

there are no conclusion that need to be drawn on the tracing backend (that I can think of) that need values of this attribute to be known.

Users at the same time can easily understand what's going on in their system by looking at traces.