Phobos Setup and Installation
Phobos ships as a series of NuGet packages that target .NET Standard 2.0, which means that Phobos can be used in any Akka.NET application that targets .NET Framework 4.6.1 or higher or .NET Core 2.0 or higher.
Step 1 - Install NuGet Packages
Once you've received access to your organization's Phobos NuGet key via Sdkbin following a completed purchase the installation procedure for Phobos is straightforward.
First step is to install the correct instrumentation package for your application.
Recommended: Phobos.Hosting
Unless you have a really good reason not to, just install Phobos.Hosting - it will simplify the entire configuration process tremendously. See Configuration - Use Phobos.Hosting for setup details.
Other: Phobos.Actor.*
Classic Install
- If you're using Akka.Cluster, install the Phobos.Actor.Cluster NuGet package;
- If you're using just Akka.Remote (no clustering,) install the Phobos.Actor.Remote NuGet package; or
- If you're using only the core Akka package, install the Phobos.Actor NuGet package.
Installing Phobos Packages from Visual Studio
To get your Phobos packages installed in your Visual Studio project, you will need to setup your private Petabridge NuGet Feed. You can do so following the steps below.
- Select Package Manger Settings in your Tools tab.
- Add a Package source by selecting the plus symbol.
- Give your source any name and add your Key, provided by Petabridge, to your Source option.
- Install your desired package through your Package Manger Console.
If you need more help getting your Phobos NuGet feed added to Visual Studio, please see the official Microsoft documentation on the subject.
Installing Phobos Packages via NuGet.Config
For projects using continuous integration or build services, it's often easier to install third-party NuGet feed packages via NuGet.config
. Here's an example of what that might look like inside your solution:
<?xml version="1.0" encoding="utf-8"?> <configuration> <solution> <add key="disableSourceControlIntegration" value="true" /> </solution> <packageSources> <clear /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="phobos" value="https://sdkbin.com/{your feed url}" /> </packageSources> </configuration>
In order for NuGet.config
to take effect, put it inside the same folder as your .sln
solution file.
NuGet Packages
- Phobos.Hosting - INSTALL THIS PACKAGE FOR EASIEST INSTALL; this package uses Akka.Hosting to turn the entire installation process into a 1-line install.
- Phobos.Actor - the core instrumentation package for Phobos.
- Phobos.Actor.Remote - remoting instrumentation package; necessary for developers who need to use Phobos over Akka.Remote.
- Phobos.Actor.Cluster - clustering instrumentation package; necessary for developers who need to use Phobos alongside Akka.Cluster.
- Phobos.Tracing - defines all of the underlying Phobos tracing instrumentation interfaces and types.
- Phobos.Monitoring - defines all of the underlying Phobos monitoring instrumentation interfaces and types.
- Phobos.TestKit - defines the
PhobosSpec
base class that can be used for testing scenarios where traces and metrics should or should not be captured inside your applications.
The only core package you need to install inside your Akka.NET application should be the Phobos.Actor.*
package that corresponds with what you're going to use inside your software. All of the other packages are automatically referenced as dependencies.
Step 2 - Configure ActorSystem
to Use Phobos
See "Configuring Phobos 2.x" for details on how to do this.
Step 3 - Setup Noise Filtering for Tracing
See "Filtering Tracing Data with Phobos" for details on how to do this.