elastic / elastic/apm-agent-java

WebFlux + APM Agent 1.55: Incorrect Transaction Duration

Open
#4,173 1 comment 0 reactions 0 assignees View on GitHub
agent-java community
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.