[go: up one dir, main page]

Skip to content

Monitoring system instrumentation in New Relic for Akka.NET actor systems.

License

Notifications You must be signed in to change notification settings

syncromatics/Akka.Monitoring.NewRelic

Repository files navigation

Akka.Monitoring.NewRelic

Monitoring system instrumentation in New Relic for Akka.NET actor systems.

Quickstart

Add the Akka.Monitoring.NewRelic package to your project:

dotnet add package Akka.Monitoring.NewRelic

Also make sure the agent is running in order to collect and report metrics from your program.

Enable the program to be monitored by the New Relic agent and name the app

From app.config:

<appSettings>
    <add key="NewRelic.AgentEnabled" value="true" />
    <add key="NewRelic.AppName" value="Akka.Monitoring.NewRelic.Demo" />
</appSettings>

Write code

  1. Register the New Relic monitor. From Program:
var system = ActorSystem.Create("akka-performance-demo");

var didMonitorRegister = ActorMonitoringExtension.RegisterMonitor(system, new ActorNewRelicMonitor());
  1. 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.

View metrics in New Relic

The instrumented metrics are collected in New Relic Insights. All metrics are prefixed with Custom/, per New Relic guidelines.

Building

Travis NuGet NuGet Pre Release

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.

Code of Conduct

We are committed to fostering an open and welcoming environment. Please read our code of conduct before participating in or contributing to this project.

Contributing

We welcome contributions and collaboration on this project. Please read our contributor's guide to understand how best to work with us.

License and Authors

GMV Syncromatics Engineering logo GMV Syncromatics Engineering

license GitHub contributors

This software is made available by GMV Syncromatics Engineering under the MIT license.