- last updated 36 day(s) ago
- 2325 daily downloads
- 1170879 total downloads
- Latest version: 2.5.1
Phobos.Tracing 1.4.2
Distributed tracing support for Akka.NET ActorSystems.
Install-Package Phobos.Tracing -Version 1.4.2
dotnet add package Phobos.Tracing --version 1.4.2
<PackageReference Include="Phobos.Tracing" Version="1.4.2"/>
paket add Phobos.Tracing --version 1.4.2
Release Notes
Maintenance Release for Phobos 1.4** Resolved: [OpenTracing: Tracing breaks when using `Ask().PipeTo()`](https://github.com/petabridge/phobos-issues/issues/44) To have tracing in Phobos 1.4 work with `PipeTo()`, you will have to use `PipeTo(recipient, true)` and call the `Ask()` method inside an `async` method even when the `Ask()` method is not `await`ed. ```c# private class PipeToActor: ReceiveActor { public PipeToActor(bool useAsync, IActorRef otherActor) { ReceiveAsync<int>(o => { // Need to make sure that async context is preserved inside PipeTo otherActor.Ask("message").PipeTo(Self, true, Sender); return Task.CompletedTask; }); } } ``` The boolean parameter in the `PipeTo(IActorRef, true, IActorRef)` method sets `ConfigureAwait(true)` inside the `PipeTo()` operation - and this allows us to preserve the current `AsyncLocal<ISpan>` context. The `ReceiveAsync` method is also needed for proper async context propagation, which is what's needed in order to ensure that the `ISpan` created by the `PipeTo` method is properly correlated to the one created by the `Ask` method.
Dependencies
.NETStandard
- Akka (>=1.4.34)
- Google.Protobuf (>=3.12.1)
- OpenTracing (>=0.12.1)
- Phobos.Actor.Common (>=1.1.1)
Versions
Info
- last updated 779 day(s) ago
- Project Site
- License Info
Statistics
- 224050 total downloads
- 12288 downloads of current version
Owners and Products
PetabridgeAuthors
Petabridge
Copyright
Copyright © 2017-2021 Petabridge
Petabridge