Monitoring system instrumentation in New Relic for Akka.NET actor systems.
dotnet add package Akka.Monitoring.NewRelic
Ensure the New Relic agent is installed.
Also make sure the agent is running in order to collect and report metrics from your program.
From app.config:
<appSettings>
<add key="NewRelic.AgentEnabled" value="true" />
<add key="NewRelic.AppName" value="Akka.Monitoring.NewRelic.Demo" />
</appSettings>
- Register the New Relic monitor. From Program:
var system = ActorSystem.Create("akka-performance-demo");
var didMonitorRegister = ActorMonitoringExtension.RegisterMonitor(system, new ActorNewRelicMonitor());
- Instrument your actor system as normal. From PlutoActor:
Receive<string>(_ =>
{
Context.IncrementCounter("revolutions");
Context.GetLogger().Debug("Whee!");
Context.Gauge("revolutions.enjoyment", random.Next(1, 11));
});
For more information on instrumenting Akka.NET actor systems, please see Akka.Monitoring.
The instrumented metrics are collected in New Relic Insights. All metrics are prefixed with Custom/
, per New Relic guidelines.
The package targets .NET Standard 2.0 and can be built via .NET Core:
dotnet build
Because the standard New Relic agent (as of verion 6.18.139.0) does not (yet) support instrumenting .NET Core apps, the demo program targets .NET Framework 4.6.2.
We are committed to fostering an open and welcoming environment. Please read our code of conduct before participating in or contributing to this project.
We welcome contributions and collaboration on this project. Please read our contributor's guide to understand how best to work with us.
This software is made available by GMV Syncromatics Engineering under the MIT license.