Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.53 KB

README.md

File metadata and controls

58 lines (39 loc) · 1.53 KB

Akka.OpenTelemetry

This is a library that provides OpenTelemetry instrumentation for Akka.NET. Status is work in progress.

Tracing currently works for:

  • Local Actors
  • Remote Actors
  • ActorSelections
  • Async-Await, tracing does propagate across async boundaries

And where it doesn't work:

  • Cluster Actors
  • Remote Deployed Actors

Akka.OpenTelemetry has been tested with Asynkron TraceView

Asynkron TraceView

sequence diagram showing Akka.NET chat application with tracing

component diagram showing Akka.NET chat application with tracing

There are currently no configuration support, all actors in /user/-space are traced.

Pull-requests are welcome.

Getting started

Installation

Install the NuGet package Akka.OpenTelemetry into your Akka.NET application.

Configuration

var tracerProvider = Sdk.CreateTracerProviderBuilder()
    .SetResourceBuilder(ResourceBuilder.CreateDefault()
        .AddService("Akka.OpenTelemetry.Demo")
    )
    .AddAkkaInstrumentation()
    .AddOtlpExporter(options =>
    {
        options.Endpoint = new Uri("http://localhost:4317");
        options.ExportProcessorType = ExportProcessorType.Batch;
    })
    .Build();
    

//augment config with OpenTelemetry settings
var bootstrap = BootstrapSetup.Create().WithOpenTelemetry();
var system = ActorSystem.Create("my-system", bootstrap);
var props = Props.Create<MyActor>();
var reff = system.ActorOf(props);