You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Elastic APM Java agent version 1.55.0 in a Java Reactive (WebFlux) application. I'm instrumenting my code using annotations like @CaptureTransaction and @CaptureSpan.
The problem is that all the transactions and spans show unrealistically short durations (e.g., 196 μs), even though the actual processing takes much longer.
It seems like the agent is measuring the duration only until the Publisher is returned, not until it's subscribed and completed. This results in incomplete or inaccurate traces and metrics.
Is this a known limitation in version 1.55?
Is there a recommended workaround (e.g., manual instrumentation using ElasticApm.startTransaction()), or is this expected to be fixed in a later release?
It sounds like you've captured the the method you have instrumented but you are expecting the full asynchronous flow to be captured. This is not possible without propagating the span context across the threads and adding specific handling for the technology you are using. These are the reasons why instrumenting, especially asynchronous technologies, is hard and takes time
You have not mentioned the WebFlux version. The APM agent supports Spring Webflux from 5.2.3+
Activity
jackshirazi commentedon Aug 6, 2025
It sounds like you've captured the the method you have instrumented but you are expecting the full asynchronous flow to be captured. This is not possible without propagating the span context across the threads and adding specific handling for the technology you are using. These are the reasons why instrumenting, especially asynchronous technologies, is hard and takes time
You have not mentioned the WebFlux version. The APM agent supports Spring Webflux from 5.2.3+