Open jenoOvchi opened 3 years ago
Hey @jenoOvchi ,
Unfortunately we won't have the capacity to implement this ourselves, but we'll gladly accept external contributions.
@jenoOvchi What kind of support are you looking for? Context propagation to stream completion callback or something else?
@laurit, We use alpakka-kafka to handle and then send new messages to kafka. Accordingly the reading of messages by the consumer and sending by the producer are further separated by asynchronous business logic.
The processing flow looks something like this: kafka-consumer -> akka-stream -> kafka-producer
. I saw that there is already support for context propagation at the vanilla kafka consumer/producer, but only for synchronous message processing.
However, in akka streams messages are processed asynchronously, i.e. after that action in KafkaConsumerActor
the batch read by the consumer from kafka is sent entirely to the actor after which the context is lost if it was in some message:
KafkaConsumerActor.scala#L632. I also saw that there is already support for context propagation for actors.
I think it would be possible to try adding a tracing context to the existing context forwarding mechanism in akka streams SourceWithContext.scala, somewhere here(MessageBuilder.scala) along with the forwarding offset of the read message and then in the kafka producer we can pull this tracing context to propagate.
@mateuszrzeszutek @laurit has there been any progress with this ticket since last update?
@suzilxptr no progress
https://github.com/kamon-io/Kamon/tree/master/instrumentation/kamon-alpakka-kafka/src/main would be a good guideline as to what is needed here
Hi!
Is it possible to implement Akka Streams Support for opentelemetry-javaagent?