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

Phobos 1.4.x - OpenTracing: Tracing breaks when using Ask().PipeTo() #44

Closed
garethjames-imburse opened this issue Feb 10, 2022 · 6 comments
Labels
actor-integration 📬 Integration with Akka.NET runtime bug Something isn't working tracing 🔬 Tracing issues
Milestone

Comments

@garethjames-imburse
Copy link

We've discovered an issue in Phobos (1.4.0 and 1.4.1) that can be seen in Jaeger when using the Ask().PipeTo() method:

myOtherActor.Ask(myMessage, TimeSpan.FromSeconds(7))
    .PipeTo(Self, sender,
        success => new MessageHandled(success),
        exception => new MessageFailed(exception));

We see a span for the actor that's asking, and the next span comes with a warning: "invalid parent span IDs=effe6a359f66ddc6; skipping clock skew adjustment".

image

However, if we modify the code to use async/await instead, it works fine:

var success = await myOtherActor.Ask(myMessage, TimeSpan.FromSeconds(7));
Context.Self.Forward(new MessageHandled(success));
@garethjames-imburse garethjames-imburse changed the title Phosbos 1.4.x - OpenTracing: Tracing breaks when using Ask().PipeTo() Phobos 1.4.x - OpenTracing: Tracing breaks when using Ask().PipeTo() Feb 10, 2022
@Aaronontheweb
Copy link
Member

Thanks @garethjames-imburse - we will investigate. Thanks for providing a clear reproduction for us.

@Aaronontheweb Aaronontheweb added this to the Phobos 1.4.2 milestone Feb 10, 2022
@Aaronontheweb Aaronontheweb added actor-integration 📬 Integration with Akka.NET runtime bug Something isn't working tracing 🔬 Tracing issues labels Feb 15, 2022
@Arkatufus
Copy link

Arkatufus commented Feb 23, 2022

@garethjames-imburse We've fixed this issue, however, to fully fix it, we will need to do an Akka.NET release first.
The fix depends on a change in Akka.NET code here: akkadotnet/akka.net#5684
The fix will be in effect on the next Phobos release after the next Akka.NET release.

@garethjames-imburse
Copy link
Author

Thanks @Arkatufus - I'll keep an eye out for the new versions.

@Arkatufus
Copy link

Arkatufus commented Mar 8, 2022

@garethjames-imburse

The new version of Phobos with the fix is up, there is a small caveat that you need to call the new PipeTo overload and the Ask method need to be inside an async method, even when you're not awaiting it. Please read the release note for a code example.

@Aaronontheweb
Copy link
Member

@garethjames-imburse
Copy link
Author

Thanks @Aaronontheweb and @Arkatufus - much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actor-integration 📬 Integration with Akka.NET runtime bug Something isn't working tracing 🔬 Tracing issues
Projects
None yet
Development

No branches or pull requests

3 participants