In order for usefull tracing in this application, I need to solve the following challenge.
The app is Quarkus based with the OTEL extension enabled. The proces get started through a POST api, which adds a message to the vertx eventbus. The eventbus triggers async processing of the messages.
I would like to use the context of the API endpoint traces / spans within the async process. To follow the outcome of the post request up until the process is completed. How to solve?
The pseudocode:
@Path("/hello")
public class GreetingResource {
@Inject
EventBus bus;
@Inject
ProcessingService processingService;
@GET
@NonBlocking
public String start() {
bus.send("topic", "dummyBody");
return "Hello from Quarkus REST";
}
@Blocking
@ConsumeEvent("topic")
public void processing(String body) {
processingService.start();
}
}