-
Notifications
You must be signed in to change notification settings - Fork 174
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: record queue vs topic behavior correctly #1220
Comments
Please copy the summary into the issue description. It should not be necessary to create a CNCF slack account and follow a link to understand important information about the issue. |
+1 to @Oberon00's suggestion. |
Sure, here's the original comment from @dpauls with my attempts to preserve formatting In our Messaging SIG meeting on Mar. 2, I agreed to look into the difference between queue and topic in the context of JMS, and whether this is useful in a trace. I'll summarize my findings below, but the summary is that I believe there's value, at least in JMS messaging, to indicate in some way the following attributes of destinations:
I have some thoughts on why durability is useful in a trace, but that hasn't come up yet in our discussions, so I'll save that for later if it becomes contentious. On the subject of uniqueness, I see evidence that other brokers allow queues and topics to have overlapping names. For example, this ActiveMQ page says:
I would agree with this best practice. Using topic vs. queue to qualify source/destination uniqueness feels awkward. Since the messaging semantics conventions use SHOULD in relation name uniqueness, I don't think it's necessary to use topic vs. queue in uniqueness. Following best practices where topics and queues get their own unique names.
|
As a way of capturing the useful concept that I think The terminology of We could extend this over time if there are other messaging patterns identified where we might expect back ends to be able to possibly identify interesting traces. If there are no significant objections to this, I could progress on preparing a PR and we could finalize details relating to wording, naming, and MAY vs. SHOULD as we go along. |
Including the text from the linked document:
I'd like to point out that each section still uses the terms queue and topic. These are very widely understood terms and I suggest we keep using them when relevant. In this case, maybe you can argue that we're trying to describe the messaging pattern where a queue or topic is a particular tool used to implement that pattern, similar to what is being done in that JMS spec. Either way, I think it is an unfortunate naming decision. |
Another potential concern... From an instrumentation perspective, it is much more obvious to automatically determine if a particular destination is a topic or queue. For anything that happens outside the bounds of the instrumented application -- inside the broker for example -- it is difficult to accurately depict how it should be modeled. |
I'd like to bring us back to the discussion how it's going to be used and what it would tell. Here's some research:
I.e. the attribute, if introduced, would not add new information for most of the systems. It can already be assumed from messaging system name. There could still be a value in adding it (so that backends don't need to maintain the mapping).
Based on all the above, let's think about telemetry backend behavior or end-user who sees queue/topic attribute: Queues:
Topics:
I.e. we can only say (with some unknown level of confidence) that:
From my perspective, there is no general-purpose tracing analysis that could be done using queue/topic terminology without prior knowledge of the system. I hope to see some deterministic analysis examples that apply to at least several messaging systems. |
In my understanding the main point here is, that with knowledge of the system the proposed attributes are redundant, except for the few cases where systems support different both queues and topics (or
I wonder if the keyword here should be "settled" rather than "delivered"? From a simplified point of view, one could say that one expects a message in a queue to be settled successfully exactly once, whereas a message from a topic can be settled successfully several times. However, things like forked messages, fire-and-forget, checkpoint-based (batch) settlement blur this picture a lot. Let's discuss again next Thursday. If we don't reach a consensus, I propose to postpone this discussion until we work on settlement attributes (which is a blocker for stable semantics), as I think there are some generic differences between settlements in queue- and topic-based scenarios, at least in a simplified view. If we don't come to a consensus in that context, I'd recommend making the issue a non-blocker for stable semantics. |
Well, having basic information about the entities interacted with is always nice. Even if you maybe can't do conclusive problem analysis, you can at least show a nice icon or group by queue vs topic |
Great point! So, if we have an attribute, it should be
the last part is how to name such an attribute and if it should be a general-purpose one. In case of Pulsar, e.g. wouldn't it make more sense to record the specific subscription type instead of saying it's a topic or queue? (p2p or pubsub). For Rabbit, wouldn't exchange_type be more precise and descriptive than So if we're going to work on it, we should have examples of how to capture it, on which spans and how to map it to specific messaging systems. In any case, it's an additive change that can be added at any moment into the spec once there is clarity. |
I think there are more behaviors to capture:
p2p/queue and pubsub/topic would not be enough to capture above behaviors or properties reliably. |
In open-telemetry/opentelemetry-specification#3214 we're removing
messaging.destination|source.kind
attribute as it's not clear what messaging system behavior it captures and how we can use this information on the backend or as an end-user.Here's the summary of @dpauls findings
https://cloud-native.slack.com/archives/C02Q4AAHDSA/p1678284552744549 on what would be useful to capture through a different set of attributes.
The text was updated successfully, but these errors were encountered: