-
Notifications
You must be signed in to change notification settings - Fork 64
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
Span context propagation from Consumer to Producer #59
Comments
Here is my code - Consumer 1
Producer 2
|
@adurai81 in Consumer you can get SpanContext from ConsumerRecord:
Then
|
Thanks @malafeev for the response. For option-1:
the value for For option-2: |
Thanks for the idea @malafeev I could inject the consumer's SpanContext into the 2nd producer with this.
|
@malafeev Should |
@adurai81 this example has the multi-hop-through-Kafka scenario: https://github.com/PacktPublishing/Mastering-Distributed-Tracing/tree/master/Chapter05 |
@adurai81
So provided I don't think inject in TracingKafkaUtils should be public. |
Thanks @yurishkuro I'll take a look at the example. @malafeev , yes it would be of help to provide overload. How do I take it forward. Will this issue be used to provide the overloaded api ? |
@adurai81 |
Signed-off-by: Sergei Malafeev <[email protected]>
done in #62 |
Thanks @malafeev , I'll test this out and let you know. |
@adurai81 have you tested it? |
I've producer-1 (SignalsProducer) which is consumed by consumer-1 (SignalsConsumer). This consumer then enriches the record and then it becomes producer-2 (EnrichedLeadProducer) which is then consumed by consumer-2 (EnrichedLeadConsumer).
These leads to 2 different traces (each of which having 2 spans) looking like this -
Sample spans within the first trace (similarly the 2nd trace) -
Expectation: In this case there should be only 1 trace will 4 spans.
Question : How do I propagate the span context from Consumer-1 to Producer-2 ?
Reviewed issue - #49
The above issue seems to be very similar to my ask (may be slightly different). Is there an example of how the context could be propagated from consumer to producer ?
The text was updated successfully, but these errors were encountered: