Hi! I am working in a spring webflux project and there is a process flow that could be invoked from two different entry points: web request and a scheduled task:
web request: working fine, I can see in the APM section automatic generated spans inside the transaction. Those spans are calls to external services (webclient), redis, rabbit, etc.
scheduled: I have disabled the scheduled config and I have annotated a principal method with @CaptureTransaction(type="Task"). This principal method calls to the rest of process (same process as in the web request flow). In this case, I can see the Transaction in the APM section but no automatic spans are being generated for those transactions. Is this normal? I would like to see spans for redis, rabbit, external services calls, etc, same as in the web request flow.
If you are seeing transactions, then that should capture any child spans. Could the second path be triggering async activity that happen in other threads?
Hi!, Thanks for your time. We are using spring webflux (reactor project), so yes, the process is a chain of pub/sub and every step could possibly be handled by a different thread. The same applies to the web request flow (first path) and it looks to be working well.
Idk to be honest how the instrumentation of webflux is implemented but it is one of the supported technologies (experimental). I always assumed that seen all the spans was the expected behavior for a supported technology. Am i wrong with the assumption?
The @CaptureTransaction wraps the method in a transaction. Any Webflux requests that would normally be instrumented should also still be instrumented, but webflux instrumented root transactions know they are async, whereas the @CaptureTransaction ones don't. I'll discuss this with my colleagues, but it would help if you can produce a simple example that we can run
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.