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

[Feature]: Support Context propagation for jaeger consumer #5343

Closed
SwanHtetAung opened this issue Apr 9, 2024 · 11 comments
Closed

[Feature]: Support Context propagation for jaeger consumer #5343

SwanHtetAung opened this issue Apr 9, 2024 · 11 comments
Labels
enhancement help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@SwanHtetAung
Copy link

SwanHtetAung commented Apr 9, 2024

Requirement

Use header value to create a new context instead of creating a plain background context.

Problem

Currently, when jaeger consumers consume messages from Sarma, it does not use the header provided by kafka message. It instead creates a new context.

Proposal

I believe the ingester should examine the context to appropriately configure tracing for the Jaeger system. Currently, the collector sends a message to Kafka, and the ingester consumes that message. However, because the ingester doesn't read from the context, it invariably initiates a new root span.

If tracing is activated for both the collector and the ingester, two separate traces are currently produced: one for the collector and another for the ingester.

By enabling the ingester to read from the context, It would consolidate these into a single trace. In short, it will show a path from collector -> ingester

Open questions

No response

@yurishkuro
Copy link
Member

there is nothing that ingester needs to read from the context. Please explain your use case.

@Adarsh-jaiss
Copy link

  • Hey @SwanHtetAung , I would love to work on this issue, can you please elaborate more about the issue, or any reference you can provide!

@SwanHtetAung
Copy link
Author

there is nothing that ingester needs to read from the context. Please explain your use case

I believe the ingester should examine the context to appropriately configure tracing for the Jaeger system. Currently, the collector sends a message to Kafka, and the ingester consumes that message. However, because the ingester doesn't read from the context, it invariably initiates a new root span.

If tracing is activated for both the collector and the ingester, two separate traces are currently produced: one for the collector and another for the ingester.

By enabling the ingester to read from the context, It would consolidate these into a single trace. In short, it will show a path from collector -> ingester.

@yurishkuro
Copy link
Member

So your use case is tracing the flow through Jaeger itself - that's fair (if a bit dangerous / recursive).

@yurishkuro yurishkuro added the help wanted Features that maintainers are willing to accept but do not have cycles to implement label Apr 9, 2024
@SwanHtetAung
Copy link
Author

what do you mean by a bit dangerous / recursive here?

@yurishkuro
Copy link
Member

You are tracing the system that captures traces - if not careful you can easily create an infinite loop. In Jaeger we historically avoided tracing of the ingestion path, only query paths are traced.

@SwanHtetAung
Copy link
Author

I see. Do you have example cases an infinite loop might happen? I was thinking this away.
Agent -> Collector -> Ingester -> Storage trace path should exists and use the same context(Ideally from agent). How can an infinite loop happen there?

@yurishkuro
Copy link
Member

Your applications start a trace A and report it to Jaeger. Jaeger receives the trace data, and in the pipeline you described above starts another trace B. Trace B is also reported as separate payload to Jaeger, which may start trace C for processing that payload, and so on.

@SwanHtetAung
Copy link
Author

I see, did not think of that case.

@yurishkuro
Copy link
Member

I am going to close this - we do not have plans to support tracing of the ingestion path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

No branches or pull requests

3 participants