Phobos.TestKit 2.12.0

Framework used for testing applications that have been instrumented using Phobos. Makes it feasible to test using data collected from actor traces, monitoring, and so forth.

Install-Package Phobos.TestKit -Version 2.12.0
dotnet add package Phobos.TestKit --version 2.12.0
<PackageReference Include="Phobos.TestKit" Version="2.12.0" />
paket add Phobos.TestKit --version 2.12.0
# Phobos ![Phobos logo](https://raw.githubusercontent.com/petabridge/phobos-issues/refs/heads/master/phobos_logo_small.png) [Phobos](https://phobos.petabridge.com/)™ is an observability plugin for [Akka.NET](https://getakka.net/) that provides [OpenTelemetry](https://opentelemetry.io/)-based tracing, metrics, and log aggregation. [Phobos is available for purchase on Sdkbin](https://sdkbin.com/publisher/petabridge/product/phobos) ## Installation Phobos plugs directly into your Akka.NET `ActorSystem` and immediately starts providing automatic tracing, metrics, and log correlation without you having to write any instrumentation code yourself. ### 1 - Add the `Phobos.Hosting` NuGet Package ```shell dotnet add package Phobos.Hosting ``` ### 2 - Configure OpenTelemetry to Use Phobos Metrics and Tracing ```csharp services // IServiceCollection .AddOpenTelemetry() .ConfigureResource(builder => { builder .AddEnvironmentVariableDetector() .AddTelemetrySdk() .AddServiceVersionDetector(); }) .UseOtlpExporter(OtlpExportProtocol.Grpc, new Uri(otlpEndpoint)) .WithMetrics(c => { c.AddRuntimeInstrumentation() .AddAspNetCoreInstrumentation() .AddHttpClientInstrumentation() .AddPhobosInstrumentation(); // Phobos metrics }) .WithTracing(c => { c.AddHttpClientInstrumentation() .AddAspNetCoreInstrumentation() .AddEntityFrameworkCoreInstrumentation() .AddSqlClientInstrumentation() .AddPhobosInstrumentation(); // Phobos traces }); ``` ### 3 - Add Phobos to Your `ActorSystem` ```csharp public static IServiceCollection AddUserServiceAkka(this IServiceCollection services, Action<AkkaConfigurationBuilder, IServiceProvider> additionalConfig) { return services.AddAkka(ActorSystemName, (builder, sp) => { builder.AddUserServiceActors() WithPhobos(AkkaRunMode.Local, configOptions => {}); additionalConfig.Invoke(builder, sp); }); } ``` And you're done! Akka.NET traces / metrics / logs will now be automatically exported along with your ASP.NET Core, Entity Framework, SqlClient, HttpClient, and other .NET OpenTelemetry data! For more detailed instructions, please see the [Phobos QuickStart Tutorial](https://phobos.petabridge.com/articles/quickstart.html) ## What Data Does Phobos Capture? You can see our full list of automatically collected traces, metrics, and log events here: [https://phobos.petabridge.com/articles/captured-data.html](https://phobos.petabridge.com/articles/captured-data.html) ### Can I Configure What Phobos Collects? Absolutely - [Phobos has finely tuneable noise control capabilities](https://phobos.petabridge.com/articles/trace-filtering.html) that allow you to configure what types of data Phobos collects fronm your application. ### What's the Performance Impact of Phobos on Akka.NET? Tracing and metrics collection always have an amount of instrumentation overhead - you can [view our latest Phobos performance figures and best practices here](https://phobos.petabridge.com/articles/performance.html). Copyright 2018-2025 [Petabridge](https://petabridge.com/), LLC
Loading README...
Version Downloads Last Updated
2.12.0 Current 74 73 day(s) ago
2.11.3 95 94 day(s) ago
2.11.2 102 100 day(s) ago
2.11.1 101 102 day(s) ago
2.11.0 129 129 day(s) ago
2.10.5 155 154 day(s) ago
2.10.4 202 204 day(s) ago
2.10.3 201 204 day(s) ago
2.10.2 268 274 day(s) ago
2.10.1 285 291 day(s) ago
2.10.0 304 310 day(s) ago
2.9.1 312 317 day(s) ago
2.9.0 328 332 day(s) ago
2.8.5 408 406 day(s) ago
2.8.4 458 452 day(s) ago
2.8.3 460 499 day(s) ago
2.8.2 487 533 day(s) ago
2.8.1 453 534 day(s) ago
2.8.0 453 541 day(s) ago
2.7.0 453 548 day(s) ago
2.6.2 454 567 day(s) ago
2.6.1 452 574 day(s) ago
2.6.0 453 582 day(s) ago
2.5.4 478 743 day(s) ago
2.5.3 454 753 day(s) ago
2.5.2 452 760 day(s) ago
2.5.1 489 842 day(s) ago
2.5.0 459 878 day(s) ago
2.4.5 461 912 day(s) ago
2.4.4 456 947 day(s) ago
2.4.3 453 954 day(s) ago
2.4.2 465 1025 day(s) ago
2.4.1 557 1086 day(s) ago
2.4.0 453 1088 day(s) ago
2.3.1 578 1144 day(s) ago
2.3.0 620 1169 day(s) ago
2.2.1 458 1172 day(s) ago
2.2.0 463 1226 day(s) ago
2.2.0-beta2 386 1227 day(s) ago
2.1.1 456 1003 day(s) ago
2.1.0 459 1271 day(s) ago
2.1.0-beta2 386 1359 day(s) ago
2.1.0-beta1 385 1433 day(s) ago
2.0.6 501 1491 day(s) ago
2.0.5 455 1495 day(s) ago
2.0.4 455 1499 day(s) ago
2.0.3 457 1507 day(s) ago
2.0.3-beta1 386 1520 day(s) ago
2.0.2 471 1543 day(s) ago
2.0.1 454 1549 day(s) ago
2.0.0 452 1550 day(s) ago
2.0.0-beta4 385 1576 day(s) ago
2.0.0-beta3 385 1620 day(s) ago
2.0.0-beta2 385 1620 day(s) ago
2.0.0-beta1 386 1626 day(s) ago
1.6.1 460 1172 day(s) ago
1.6.0 469 1178 day(s) ago
1.5.1 495 1550 day(s) ago
1.5.0 453 1550 day(s) ago
1.5.0-beta1 385 1576 day(s) ago
1.4.2 575 1585 day(s) ago
1.4.1 513 1620 day(s) ago
1.4.0 455 1634 day(s) ago
1.3.3 501 1649 day(s) ago
1.3.2 454 1663 day(s) ago
1.3.1 451 1674 day(s) ago
1.3.0 649 1695 day(s) ago
1.2.5 475 1732 day(s) ago
1.2.4 570 1733 day(s) ago
1.2.3 729 1766 day(s) ago
1.2.2 510 1788 day(s) ago
1.2.1 452 1796 day(s) ago
1.2.0 1,017 1849 day(s) ago
1.1.4 578 1865 day(s) ago
1.1.3 460 1871 day(s) ago
1.1.2 702 1891 day(s) ago
1.1.1 906 1935 day(s) ago
1.1.0 1,123 1992 day(s) ago
1.0.6 536 2026 day(s) ago
1.0.5 536 2041 day(s) ago
1.0.4 821 2062 day(s) ago
1.0.3 533 2097 day(s) ago
1.0.2 619 2109 day(s) ago
1.0.1 535 2109 day(s) ago
0.8.0 533 1996 day(s) ago
0.7.2 536 1996 day(s) ago
0.7.1 536 1996 day(s) ago
0.7.0 533 1996 day(s) ago
**Phobos 2.x Release** **New Feature: Akka.Streams Trace Continuity** Phobos 2.12.0 adds automatic trace-context propagation through Akka.Streams graphs. With Akka.NET 1.5.66+, which ships the framework-owned `"Akka.Streams"` `ActivitySource`, every element flowing through a stream stage carries its parent trace context forward — connecting your actor message handler, the stream graph stages, and any user spans created inside lambdas (e.g. `SqlClient`, `HttpClient` instrumentation) into one unbroken distributed trace. The resulting trace shape looks like this: ``` [actor] akka.msg.recv RecordOrder [stream] akka.stream.ingress QueueSource [stream] akka.stream.stage SelectAsync [user] db.INSERT (SqlClient / HttpClient / etc.) ``` **Akka.Streams tracing is on by default.** No code changes are required if you already call `AddPhobosInstrumentation()` — it registers the `"Akka.Streams"` `ActivitySource` automatically: ```csharp services.AddOpenTelemetry() .WithTracing(tracing => tracing .AddPhobosInstrumentation() // traceAkkaStreams: true by default .AddOtlpExporter()); ``` To opt out of stream-stage spans: ```csharp services.AddOpenTelemetry() .WithTracing(tracing => tracing .AddPhobosInstrumentation(traceAkkaStreams: false) .AddOtlpExporter()); ``` For details on the underlying Akka.NET `"Akka.Streams"` `ActivitySource`, see: [Akka.Streams OpenTelemetry Tracing](https://getakka.net/articles/streams/stream-tracing.html) in the Akka.NET documentation. See [#1506](https://github.com/petabridge/phobos/pull/1506). **Bug Fixes** - Fixed `ReceiveAsync`/`CommandAsync` message-receive spans closing prematurely before the async handler completed. The `akka.msg.recv` span now stays open for the full duration of the async handler, accurately capturing duration and faults across `await` points. Also un-skips the long-standing `AsyncAwaitRequestResponseWithFiltering` trace-continuity test that was suppressed since Phobos 1.3.0. See [#1528](https://github.com/petabridge/phobos/pull/1528). **Improvements** - Upgraded to [Akka.NET v1.5.67](https://github.com/akkadotnet/akka.net/releases/tag/1.5.67) and [Akka.Hosting v1.5.67](https://github.com/akkadotnet/Akka.Hosting/releases/tag/1.5.67) for latest stability and performance improvements.

Info

Statistics

  • 40727 total downloads
  • 74 downloads of current version
  • 91.8 KB package size

Owners and Products

Petabridge Petabridge

Authors

Petabridge

Copyright

Copyright © 2017-2026 Petabridge