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

Support Akka Streams #3052

Open
jenoOvchi opened this issue May 20, 2021 · 6 comments
Open

Support Akka Streams #3052

jenoOvchi opened this issue May 20, 2021 · 6 comments
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request new instrumentation

Comments

@jenoOvchi
Copy link

Hi!

Is it possible to implement Akka Streams Support for opentelemetry-javaagent?

@jenoOvchi jenoOvchi added the enhancement New feature or request label May 20, 2021
@mateuszrzeszutek
Copy link
Member

Hey @jenoOvchi ,

Unfortunately we won't have the capacity to implement this ourselves, but we'll gladly accept external contributions.

@mateuszrzeszutek mateuszrzeszutek added the contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome label May 21, 2021
@laurit
Copy link
Contributor

laurit commented Jun 10, 2021

@jenoOvchi What kind of support are you looking for? Context propagation to stream completion callback or something else?

@unit7-0
Copy link

unit7-0 commented Jun 16, 2021

@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.

@suzilxptr
Copy link

suzilxptr commented Apr 26, 2024

@mateuszrzeszutek @laurit has there been any progress with this ticket since last update?

@laurit
Copy link
Contributor

laurit commented Apr 26, 2024

@suzilxptr no progress

@pjfanning
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request new instrumentation
Projects
None yet
Development

No branches or pull requests

6 participants