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
Paket is a third-party, open source alternative to the NuGet client.
# Phobos

[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
- Akka (>=1.5.67)
- Google.Protobuf (>=3.26.1)
- OpenTelemetry (>=1.15.3)
- Phobos.Actor.Common (>=1.1.2)
netstandard2.0
- Akka (>=1.5.67)
- Google.Protobuf (>=3.26.1)
- OpenTelemetry (>=1.15.3)
- Phobos.Actor.Common (>=1.1.2)
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2.12.0 Current | 7 | 3 hour(s) ago | |
| 2.11.3 | 1,328 | 21 day(s) ago | |
| 2.11.2 | 211 | 27 day(s) ago | |
| 2.11.1 | 66 | 28 day(s) ago | |
| 2.11.0 | 1,463 | 56 day(s) ago | |
| 2.10.5 | 6,701 | 81 day(s) ago | |
| 2.10.4 | 5,032 | 131 day(s) ago | |
| 2.10.3 | 133 | 131 day(s) ago | |
| 2.10.2 | 15,231 | 201 day(s) ago | |
| 2.10.1 | 2,434 | 218 day(s) ago | |
| 2.10.0 | 1,553 | 237 day(s) ago | |
| 2.9.1 | 592 | 244 day(s) ago | |
| 2.9.0 | 1,328 | 259 day(s) ago | |
| 2.8.5 | 11,361 | 333 day(s) ago | |
| 2.8.4 | 4,124 | 379 day(s) ago | |
| 2.8.3 | 8,171 | 426 day(s) ago | |
| 2.8.2 | 3,135 | 460 day(s) ago | |
| 2.8.1 | 1,015 | 461 day(s) ago | |
| 2.8.0 | 1,911 | 468 day(s) ago | |
| 2.7.0 | 1,174 | 475 day(s) ago | |
| 2.6.2 | 1,583 | 494 day(s) ago | |
| 2.6.1 | 525 | 501 day(s) ago | |
| 2.6.0 | 1,549 | 509 day(s) ago | |
| 2.5.4 | 97,127 | 670 day(s) ago | |
| 2.5.3 | 1,120 | 680 day(s) ago | |
| 2.5.2 | 979 | 686 day(s) ago | |
| 2.5.1 | 18,341 | 769 day(s) ago | |
| 2.5.0 | 17,401 | 805 day(s) ago | |
| 2.4.5 | 2,892 | 839 day(s) ago | |
| 2.4.4 | 975 | 874 day(s) ago | |
| 2.4.3 | 9,651 | 881 day(s) ago | |
| 2.4.2 | 10,254 | 952 day(s) ago | |
| 2.4.1 | 11,938 | 1012 day(s) ago | |
| 2.4.0 | 739 | 1015 day(s) ago | |
| 2.3.1 | 8,585 | 1070 day(s) ago | |
| 2.3.0 | 12,273 | 1096 day(s) ago | |
| 2.2.1 | 1,195 | 1099 day(s) ago | |
| 2.2.0 | 2,215 | 1153 day(s) ago | |
| 2.2.0-beta2 | 318 | 1154 day(s) ago | |
| 2.1.1 | 558 | 929 day(s) ago | |
| 2.1.0 | 2,158 | 1198 day(s) ago | |
| 2.1.0-beta2 | 573 | 1286 day(s) ago | |
| 2.1.0-beta1 | 458 | 1359 day(s) ago | |
| 2.0.6 | 65,920 | 1418 day(s) ago | |
| 2.0.5 | 455 | 1422 day(s) ago | |
| 2.0.4 | 423 | 1426 day(s) ago | |
| 2.0.3 | 437 | 1433 day(s) ago | |
| 2.0.3-beta1 | 329 | 1447 day(s) ago | |
| 2.0.2 | 4,585 | 1470 day(s) ago | |
| 2.0.1 | 529 | 1476 day(s) ago | |
| 2.0.0 | 419 | 1477 day(s) ago | |
| 2.0.0-beta4 | 755 | 1503 day(s) ago | |
| 2.0.0-beta3 | 772 | 1546 day(s) ago | |
| 2.0.0-beta2 | 330 | 1547 day(s) ago | |
| 2.0.0-beta1 | 417 | 1553 day(s) ago | |
| 1.6.1 | 4,592 | 1099 day(s) ago | |
| 1.6.0 | 477 | 1104 day(s) ago | |
| 1.5.1 | 14,038 | 1477 day(s) ago | |
| 1.5.0 | 388 | 1477 day(s) ago | |
| 1.5.0-beta1 | 318 | 1503 day(s) ago | |
| 1.4.2 | 12,962 | 1512 day(s) ago | |
| 1.4.1 | 2,391 | 1547 day(s) ago | |
| 1.4.0 | 439 | 1560 day(s) ago | |
| 1.3.3 | 7,339 | 1576 day(s) ago | |
| 1.3.2 | 824 | 1589 day(s) ago | |
| 1.3.1 | 880 | 1600 day(s) ago | |
| 1.3.0 | 7,508 | 1621 day(s) ago | |
| 1.2.5 | 1,548 | 1658 day(s) ago | |
| 1.2.4 | 1,084 | 1660 day(s) ago | |
| 1.2.3 | 3,634 | 1693 day(s) ago | |
| 1.2.2 | 2,703 | 1714 day(s) ago | |
| 1.2.1 | 1,064 | 1722 day(s) ago | |
| 1.2.0 | 2,350 | 1776 day(s) ago | |
| 1.1.4 | 1,841 | 1792 day(s) ago | |
| 1.1.3 | 625 | 1798 day(s) ago | |
| 1.1.2 | 3,785 | 1818 day(s) ago | |
| 1.1.1 | 6,177 | 1862 day(s) ago | |
| 1.1.0 | 11,438 | 1919 day(s) ago | |
| 1.0.6 | 939 | 1953 day(s) ago | |
| 1.0.5 | 592 | 1968 day(s) ago | |
| 1.0.4 | 1,990 | 1989 day(s) ago | |
| 1.0.3 | 1,235 | 2024 day(s) ago | |
| 1.0.2 | 1,618 | 2036 day(s) ago | |
| 1.0.1 | 471 | 2036 day(s) ago | |
| 0.7.0 | 36,520 | 1923 day(s) ago | |
| 0.6.1 | 469 | 1923 day(s) ago | |
| 0.6.0 | 547 | 1923 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
- last updated 3 hour(s) ago
- Project Site
- License Info
Statistics
- 478534 total downloads
- 7 downloads of current version
- 69.0 KB package size
Owners and Products
Petabridge
Authors
Petabridge
Copyright
Copyright © 2017-2026 Petabridge