Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Tracing for Scala broken when using Promises #2053

Open
jmreardon-yoppworks opened this issue Sep 17, 2024 · 1 comment
Open

Async Tracing for Scala broken when using Promises #2053

jmreardon-yoppworks opened this issue Sep 17, 2024 · 1 comment
Labels
bug Something isn't working as designed/intended

Comments

@jmreardon-yoppworks
Copy link

jmreardon-yoppworks commented Sep 17, 2024

Description

I am trying to use the Scala instrumentation and asyncTrace to track a transaction in Scala code. One of the Futures is ultimately backed by a Scala Promise that is completed by another thread pool. When I have one of these futures in the chain offlatMaps, subsequent operations are not captured in the transaction.

Similar behavior happens if a Future started outside the transaction is included in the flatMap chain.

(Specifically, the Future is the result of an Akka Stream, but I can reproduce the issue without using Akka).

Expected Behavior

I expect my async traces to work regardless of how the Futures involved in it are created/completed.

Steps to Reproduce

This repository reproduces the issue: https://github.com/jmreardon-yoppworks/new-relic-promises

During my testing I found I could recover the transaction by explicitly linking the transaction with a token, but I needed to nest a Future oddly to make it work.

Your Environment

Mac OS Intel

@jmreardon-yoppworks jmreardon-yoppworks added the bug Something isn't working as designed/intended label Sep 17, 2024
@workato-integration
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as designed/intended
Projects
Development

No branches or pull requests

1 participant