newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 143 forks source link

Investigate missing async externals when Spring Reactor is in use #1780

Closed kford-newrelic closed 5 months ago

kford-newrelic commented 8 months ago

Description

Customer reported issue:

We just tested the latest APM agent (8.8.1) and we’re still facing the instrumentation gap issue.For context, in all of our services the APM agent seems to be working fine, but we have 1 service which is a bit more complex (heavier reactor usage and more external webservice calls) in which we don’t see all the external calls. The call flow is typical :Spring mvc controller -> Business logic service (where we chain a lot of reactor Fluxes and Monos) -> External service webclientOur traces stop at the controller except for 1 webservice call that we execute at the very start of our reactor chain in the business logic service, all the other calls are absent from the traces.Relevant dependencies :

  • spring boot 2.5.14
  • spring mvc, webflux 5.3.20
  • reactor-netty-(http & core) 1.0.19
  • reactor-core (3.4.18)

Acceptance Criteria

Discovery spike.

Design Consideration/Limitations

Possible unexpected thread hop?

Dependencies

N/A

Additional context

Customer repro available

workato-integration[bot] commented 8 months ago

https://new-relic.atlassian.net/browse/NR-236119

jbedell-newrelic commented 7 months ago

Closing this Spike out with the results detailed in https://github.com/newrelic/newrelic-java-agent/issues/1800

jbedell-newrelic commented 6 months ago

The fix here did resolve part of the issue, but more complex call-chaining is still not working. So, I'm re-opening this ticket to investigate further. We also believe this may be related to: https://github.com/newrelic/newrelic-java-agent/issues/1450