Skip to content
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

Integrate OTEP-205 (messaging context propagation requirements) into the spec #2749

Closed
joaopgrassi opened this issue Aug 25, 2022 · 6 comments · Fixed by #2750
Closed

Integrate OTEP-205 (messaging context propagation requirements) into the spec #2749

joaopgrassi opened this issue Aug 25, 2022 · 6 comments · Fixed by #2750
Assignees
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal

Comments

@joaopgrassi
Copy link
Member

What are you trying to achieve?

Integrate the OTEP-205 Context propagation requirements for messaging semantic conventions into the spec.

Additional context.

As stated in the OTEP, the existing messaging semantic conventions for tracing define trace examples that implicitly require the context to be propagated via the message. The OTEP's goal was to make the context propagation requirement clear and explicit so instrumentation authors have more guidance when working on messaging instrumentation.

@joaopgrassi joaopgrassi added the spec:trace Related to the specification/trace directory label Aug 25, 2022
@arminru arminru added the area:semantic-conventions Related to semantic conventions label Aug 25, 2022
@carlosalberto
Copy link
Contributor

Re-assigning to @jsuereth as he may be interested. Let's discuss in case this needs to be reassigned to somebody else.

@rbailey7210 rbailey7210 added the triaged-needmoreinfo The issue is triaged - the OTel community needs more information to decide label Aug 26, 2022
@joaopgrassi
Copy link
Member Author

joaopgrassi commented Sep 1, 2022

@rbailey7210 Hi! Could you please let me know what needs more information here? The OTEP already has an extensive explanation on the motivation so I'm a bit confused.

@reyang
Copy link
Member

reyang commented Sep 2, 2022

@joaopgrassi this issues needs more discussion, currently there is no good evidence indicating whether we should accept or reject. Please collect more feedback, and if you are stuck, follow https://github.com/open-telemetry/opentelemetry-specification/blob/main/issue-management.md#when-issues-get-stuck.

@joaopgrassi
Copy link
Member Author

joaopgrassi commented Sep 5, 2022

Hi @reyang !

I read that and still not sure though how I would promote more discussion here. The OTEP where this work is coming from contains context, rational and discussions. I can join the next spec call and bring the topic there, if that's preferred.

Nevertheless, I'll add the summary here: The current messaging semantic conventions have example diagrams and show how a trace looks like for different messaging scenarios. Neither the document nor the example diagrams talk about how exactly the context is to be propagated in such cases. Instrumentation authors are open to figure out on their own

In messaging systems, it's common that a message goes through many hops before it reaches its "final destination". The "traditional" context propagation mechanisms we have today (traceparent via headers) is not enough to cover such cases. If such mechanism is used for messaging systems, you end up with two traces: one for the producer > intermediary and another from intermediary > consumer that can't be connected to each other. This of course makes identifying problems hard, as you don't know which component received a message and can't correlate both consumer and producer traces.

What is implicit then in the current messaging semantic conventions spec is that the message itself is the mechanism which is used to propagate context. Consider one of the example in the current document

graph TD
    Producer -->|Publish message| C{Intermediary}
    C -->|Pull| D[Consumer1]
    C -->|Pull| E[Consumer2]
Loading

This would produce traces like this, using the "traditional" context propagation mechanisms

+---------------------------------------------------+
|     Producer trace                                |
|                                                   |
|     +---------------------------------------+     |
|     |  Publish message                      |     |
|     +---------------------------------------+     |
+---------------------------------------------------+
+---------------------------------------------------+
|     Consumer1 trace                               |
|                                                   |
|     +--------------------+                        |
|     |  Receive message   |                        |
|     +--------------------+                        |
|                           +--------------------+  |
|                           | Process message    |  |
|                           +--------------------+  |
+---------------------------------------------------+

So, two independent traces, no way to correlate them. With the OTEP, this issue and the linked PR we are trying to make the propagation via message explicit in the conventions. Then we could achieve a trace like this using links (not the goal of this issue)

+---------------------------------------------------------------------+
|                Producer trace                                       |
|                                                                     |
|                +---------------------------------------+            |
|      +---------|  Publish message                      |            |
|      |         +---------------------------------------+            |
|      |                                                              |
|    L |                                                              |
|    I |   +---------------------------------------------------+      |
|    N |   |     Consumer1 trace                               |      |
|    K |   |                                                   |      |
|      |   |     +--------------------+                        |      |
|      +---------|  Receive message   |                        |      |
|          |     +--------------------+                        |      |
|          |                           +--------------------+  |      |
|          |                           | Process message    |  |      |
|          |                           +--------------------+  |      |
|          |                                                   |      |
|          +---------------------------------------------------+      |
+---------------------------------------------------------------------+

@reyang
Copy link
Member

reyang commented Sep 6, 2022

@joaopgrassi I think there are fundamental problems we need to address regarding #2753, with the dependency and current capacity of the TC, I'm not sure if this will be treated as a high priority.

@joaopgrassi
Copy link
Member Author

joaopgrassi commented Sep 29, 2022

@reyang @rbailey7210 giving the latest guidance in #2753, I think this PR is fine to go through. It doesn't touch on any of the topics there (metrics, resouce, etc).

@reyang reyang added triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal and removed triaged-needmoreinfo The issue is triaged - the OTel community needs more information to decide labels Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions spec:trace Related to the specification/trace directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal
Projects
Status: V1 - Stable Semantics
6 participants