https://github.com/asynkron/akka.opentelemetry
https://github.com/asynkron/akka.opentelemetry
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/asynkron/akka.opentelemetry
- Owner: asynkron
- License: apache-2.0
- Created: 2022-12-09T20:41:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-26T13:25:53.000Z (11 months ago)
- Last Synced: 2025-04-09T00:05:58.194Z (13 days ago)
- Language: C#
- Size: 966 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 boundariesAnd where it doesn't work:
* Cluster Actors
* Remote Deployed ActorsAkka.OpenTelemetry has been tested with Asynkron TraceView
[Asynkron TraceView](https://github.com/asynkron/TraceViewDeploy)
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
```csharp
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();
var reff = system.ActorOf(props);
```