Phobos.Hosting 2.12.0

Akka.Hosting prototype support for Phobos.

Install-Package Phobos.Hosting -Version 2.12.0
dotnet add package Phobos.Hosting --version 2.12.0
<PackageReference Include="Phobos.Hosting" Version="2.12.0" />
paket add Phobos.Hosting --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...
net8.0
netstandard2.0
Version Downloads Last Updated
2.12.0 Current 6,445 66 day(s) ago
2.11.3 2,035 87 day(s) ago
2.11.2 197 94 day(s) ago
2.11.1 190 95 day(s) ago
2.11.0 1,649 123 day(s) ago
2.10.5 10,812 148 day(s) ago
2.10.4 5,688 198 day(s) ago
2.10.3 213 198 day(s) ago
2.10.2 25,101 267 day(s) ago
2.10.1 2,056 285 day(s) ago
2.10.0 1,588 304 day(s) ago
2.9.1 655 311 day(s) ago
2.9.0 1,102 326 day(s) ago
2.8.5 10,872 400 day(s) ago
2.8.4 4,156 445 day(s) ago
2.8.3 7,862 493 day(s) ago
2.8.2 3,406 527 day(s) ago
2.8.1 861 528 day(s) ago
2.8.0 2,007 534 day(s) ago
2.7.0 1,221 541 day(s) ago
2.6.2 1,614 561 day(s) ago
2.6.1 618 567 day(s) ago
2.6.0 1,644 576 day(s) ago
2.5.4 95,486 737 day(s) ago
2.5.3 1,239 747 day(s) ago
2.5.2 1,045 753 day(s) ago
2.5.1 18,336 836 day(s) ago
2.5.0 10,727 872 day(s) ago
2.4.5 2,556 906 day(s) ago
2.4.4 751 940 day(s) ago
2.4.3 1,241 947 day(s) ago
2.4.2 1,634 1019 day(s) ago
2.4.1 7,755 1079 day(s) ago
2.4.0 794 1082 day(s) ago
2.3.1 6,478 1137 day(s) ago
2.3.0 3,129 1163 day(s) ago
2.2.1 1,167 1166 day(s) ago
2.2.0 1,570 1219 day(s) ago
2.2.0-beta2 377 1221 day(s) ago
2.1.1 448 996 day(s) ago
2.1.0 998 1264 day(s) ago
2.1.0-beta2 570 1353 day(s) ago
2.1.0-beta1 380 1426 day(s) ago
2.0.6 53,222 1485 day(s) ago
2.0.5 480 1489 day(s) ago
2.0.4 465 1493 day(s) ago
2.0.3 467 1500 day(s) ago
2.0.3-beta1 380 1513 day(s) ago
2.0.2 625 1537 day(s) ago
2.0.1 566 1543 day(s) ago
2.0.0 458 1544 day(s) ago
1.6.1 470 1166 day(s) ago
1.6.0 448 1171 day(s) ago
1.5.1 696 1544 day(s) ago
1.5.0-beta 377 1544 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

  • 307327 total downloads
  • 6445 downloads of current version
  • 59.5 KB package size

Owners and Products

Petabridge Petabridge

Authors

Petabridge

Copyright

Copyright © 2017-2026 Petabridge