Code Monkey home page Code Monkey logo

akka.logger.newrelic's Introduction

Akka.Logger.NewRelic

Logger implementation in New Relic for Akka.NET actor systems.

Quickstart

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

dotnet add package Akka.Logger.NewRelic

Also make sure the agent is running in order to collect and report transactions 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.Logger.NewRelic.Demo" />
</appSettings>

Reference the New Relic logger in the Akka configuration

Example New Relic logger configuration inside your app.config or web.config:

akka {
    loggers = ["Akka.Logger.NewRelic.NewRelicLogger, Akka.Logger.NewRelic"]
}

(See Program.cs for an example of logger configuration directly in code.)

Build an IoC container with proxied actors

Using Autofac, from Program.cs:

// Build an Autofac container with the AroundReceiveInterceptor registered for all actors to be instrumented
var builder = new ContainerBuilder();
builder.RegisterType<AroundReceiveInterceptor>();
builder.RegisterAssemblyTypes(typeof(QuickResponder).Assembly)
    .Where(t => t.IsSubclassOf(typeof(ActorBase)))
    .EnableClassInterceptors()
    .InterceptedBy(typeof(AroundReceiveInterceptor));

// Register the TransactionWrapper to enable the New Relic agent to instrument the intercepted actors
builder.RegisterInstance<TransactionWrapper>(TransactionWrapper);

// Register the Autofac DI resolver
var container = builder.Build();
new Akka.DI.AutoFac.AutoFacDependencyResolver(container, system);

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.

akka.logger.newrelic's People

Contributors

k-grant avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

k-grant

akka.logger.newrelic's Issues

Update the DX documents with the latest Syncromatics.Engineering.DX.Common template

Overview

The Syncromatics.Engineering.DX.Common template was recently updated to include a new email address.

Implementation notes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.