
- last updated 20 day(s) ago
- 4189 daily downloads
- 1769688 total downloads
- Latest version: 2.8.3

Phobos.Actor 1.2.0
Automatic Akka.NET tracing and monitoring integration as part of the Phobos Enterprise Framework.
Install-Package Phobos.Actor -Version 1.2.0
dotnet add package Phobos.Actor --version 1.2.0
<PackageReference Include="Phobos.Actor" Version="1.2.0"/>
paket add Phobos.Actor --version 1.2.0
Release Notes
Maintenance Release for Phobos 1.2** - [Resolved some `IScope` memory leaks occurring inside Phobos](https://github.com/petabridge/phobos-issues/issues/19) - these occured as a result of `IScope` being lost inside `async` contexts and because some `IScope`s were not properly disposed the actor had a different `IScope` set as its active scope. - Added new [`PhobosSetup.Create` method](https://phobos.petabridge.com/api/Phobos.Actor.PhobosSetup.html) which creates its own [`PhobosConfigBuilder`](https://phobos.petabridge.com/api/Phobos.Actor.Configuration.PhobosConfigBuilder.html), rather than requiring users to create and pass one in first. Significantly improved trace filtering, with the new `TraceConfigBuilder.IncludeMessagesAlreadyInTrace(bool includeInTrace)` method, which allows users to coimpletely drop any messages inside an active trace that don't match your `IFilterRules` - this is designed for high throughput scenarios where users really want to greatly reduce the amount of data being created by their tracing system. Here's an example of it in action: ```csharp var config = @"akka.actor.provider = ""Phobos.Actor.PhobosActorRefProvider,Phobos.Actor"""; var tracer = new MockTracer(new ActorScopeManager()); var phobosConfig = new PhobosConfigBuilder() .WithTracing(m => { m.SetTracer(tracer); // don't include messages in trace that don't satisfy other filters m.IncludeMessagesAlreadyInTrace(false); // only accept FilteredMessage types m.AddIncludeMessageFilter<FilteredMessage>(); }); // create PhobosSetup + BootstrapSetup for configuring ActorSystem var phobosSetup = PhobosSetup.Create(phobosConfig) .WithSetup(BootstrapSetup.Create().WithConfig(config)); sys = ActorSystem.Create("PhobosTest", phobosSetup); var actor = sys.ActorOf(Props.Create(() => new EchoActor()), "echo"); var actor2 = sys.ActorOf(act => { IActorRef sender = null; act.Receive<FilteredMessage>((f, ctx) => { sender = ctx.Sender; actor.Tell(f.Message); }); act.Receive<string>((str, ctx) => { sender.Tell(str, ctx.Self); }); }, "secondActor"); // send a message that WILL be filtered out actor2.Ask<string>(new FilteredMessage("bye"), TimeSpan.FromMilliseconds(100)).Wait(); Task.Delay(300).Wait(); // wait for activity in other threads to stop var spans = tracer.FinishedSpans(); spans.Count.Should().Be(1); // for the FilteredMessage only ```
Dependencies
.NETStandard
- Phobos.Monitoring (>=1.2.0)
- Phobos.Tracing (>=1.2.0)
- Phobos.Actor.Common (>=1.1.1)
Versions
Info
- last updated 1370 day(s) ago
- Project Site
- License Info
Statistics
- 282558 total downloads
- 1970 downloads of current version
Owners and Products

Authors
Petabridge
Copyright
Copyright © 2017-2021 Petabridge
Petabridge