Phobos.Tracing 2.12.0

Distributed tracing support for Akka.NET ActorSystems.

Install-Package Phobos.Tracing -Version 2.12.0
dotnet add package Phobos.Tracing --version 2.12.0
<PackageReference Include="Phobos.Tracing" Version="2.12.0" />
paket add Phobos.Tracing --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 13,126 118 day(s) ago
2.11.3 2,459 139 day(s) ago
2.11.2 333 146 day(s) ago
2.11.1 275 147 day(s) ago
2.11.0 1,811 175 day(s) ago
2.10.5 14,690 200 day(s) ago
2.10.4 6,370 250 day(s) ago
2.10.3 253 250 day(s) ago
2.10.2 27,970 319 day(s) ago
2.10.1 2,572 337 day(s) ago
2.10.0 1,925 356 day(s) ago
2.9.1 720 363 day(s) ago
2.9.0 1,447 378 day(s) ago
2.8.5 11,558 452 day(s) ago
2.8.4 4,497 497 day(s) ago
2.8.3 8,429 545 day(s) ago
2.8.2 3,428 579 day(s) ago
2.8.1 1,136 580 day(s) ago
2.8.0 2,032 586 day(s) ago
2.7.0 1,293 593 day(s) ago
2.6.2 1,704 613 day(s) ago
2.6.1 642 620 day(s) ago
2.6.0 1,665 628 day(s) ago
2.5.4 106,100 789 day(s) ago
2.5.3 1,239 799 day(s) ago
2.5.2 1,095 805 day(s) ago
2.5.1 18,928 888 day(s) ago
2.5.0 22,723 924 day(s) ago
2.4.5 3,013 958 day(s) ago
2.4.4 1,092 992 day(s) ago
2.4.3 9,878 999 day(s) ago
2.4.2 11,783 1071 day(s) ago
2.4.1 12,054 1131 day(s) ago
2.4.0 859 1134 day(s) ago
2.3.1 8,705 1189 day(s) ago
2.3.0 13,080 1215 day(s) ago
2.2.1 1,312 1218 day(s) ago
2.2.0 2,332 1271 day(s) ago
2.2.0-beta2 437 1273 day(s) ago
2.1.1 680 1048 day(s) ago
2.1.0 2,278 1316 day(s) ago
2.1.0-beta2 690 1405 day(s) ago
2.1.0-beta1 576 1478 day(s) ago
2.0.6 66,047 1537 day(s) ago
2.0.5 572 1541 day(s) ago
2.0.4 539 1545 day(s) ago
2.0.3 558 1552 day(s) ago
2.0.3-beta1 446 1565 day(s) ago
2.0.2 4,701 1589 day(s) ago
2.0.1 647 1595 day(s) ago
2.0.0 538 1596 day(s) ago
2.0.0-beta4 873 1621 day(s) ago
2.0.0-beta3 890 1665 day(s) ago
2.0.0-beta2 447 1666 day(s) ago
2.0.0-beta1 534 1672 day(s) ago
1.6.1 4,710 1218 day(s) ago
1.6.0 595 1223 day(s) ago
1.5.1 14,178 1596 day(s) ago
1.5.0 504 1596 day(s) ago
1.5.0-beta1 434 1621 day(s) ago
1.4.2 13,135 1631 day(s) ago
1.4.1 2,507 1666 day(s) ago
1.4.0 556 1679 day(s) ago
1.3.3 7,455 1695 day(s) ago
1.3.2 941 1708 day(s) ago
1.3.1 996 1719 day(s) ago
1.3.0 7,625 1740 day(s) ago
1.2.5 1,664 1777 day(s) ago
1.2.4 1,203 1779 day(s) ago
1.2.3 3,753 1812 day(s) ago
1.2.2 2,820 1833 day(s) ago
1.2.1 1,180 1841 day(s) ago
1.2.0 2,466 1895 day(s) ago
1.1.4 1,960 1911 day(s) ago
1.1.3 741 1917 day(s) ago
1.1.2 3,901 1937 day(s) ago
1.1.1 6,293 1980 day(s) ago
1.1.0 11,557 2038 day(s) ago
1.0.6 1,055 2072 day(s) ago
1.0.5 710 2087 day(s) ago
1.0.4 2,106 2108 day(s) ago
1.0.3 1,351 2142 day(s) ago
1.0.2 1,736 2155 day(s) ago
1.0.1 588 2155 day(s) ago
0.7.0 36,637 2042 day(s) ago
0.6.1 585 2042 day(s) ago
0.6.0 694 2042 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

  • 542617 total downloads
  • 13126 downloads of current version
  • 69.0 KB package size

Owners and Products

Petabridge Petabridge

Authors

Petabridge

Copyright

Copyright © 2017-2026 Petabridge