Elven.Observability.Core 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Elven.Observability.Core --version 0.1.0
                    
NuGet\Install-Package Elven.Observability.Core -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Elven.Observability.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Elven.Observability.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Elven.Observability.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Elven.Observability.Core --version 0.1.0
                    
#r "nuget: Elven.Observability.Core, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Elven.Observability.Core@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Elven.Observability.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Elven.Observability.Core&version=0.1.0
                    
Install as a Cake Tool

Elven Observability .NET

Production-grade OpenTelemetry bootstrap for modern .NET services on the Elven Observability LGTM stack: Loki, Grafana, Tempo, and Mimir.

This distribution wraps the official OpenTelemetry .NET SDK and auto-instrumentation. It does not replace OTel. Elven mode always configures traces, metrics, and logs.

Install

dotnet add package Elven.Observability

ASP.NET Core

var builder = WebApplication.CreateBuilder(args);

builder.AddElvenObservability(options =>
{
    options.ServiceName = "billing-api";
    options.ServiceNamespace = "payments";
    options.Endpoint = new Uri("https://otlp.elven.io");
    options.TenantId = "acme";
    options.ApiKey = builder.Configuration["ELVEN_API_KEY"];
    options.SamplingRatio = 1.0;
});

var app = builder.Build();
app.UseElvenObservability();
app.MapElvenObservabilityHealthCheck();
app.Run();

Generic Host / Worker

var builder = Host.CreateApplicationBuilder(args);
builder.AddElvenObservability();
await builder.Build().RunAsync();

Console / No Host

await using var observability = ElvenObservability.Initialize(options =>
{
    options.ServiceName = "batch-job";
    options.TenantId = "acme";
});

using var activity = ElvenTelemetry.ActivitySource.StartActivity("job.run");
ElvenTelemetry.Meter.CreateCounter<long>("jobs.started").Add(1);
observability.LoggerFactory.CreateLogger("Batch.Job").LogInformation("Job started.");
await observability.ForceFlushAsync();

Auto-Instrumentation

./scripts/install.sh
. "$HOME/.otel-dotnet-auto/instrument.sh"

export OTEL_DOTNET_AUTO_PLUGINS="Elven.Observability.AutoInstrumentation.ElvenPlugin, Elven.Observability.AutoInstrumentation"
export OTEL_SERVICE_NAME=billing-api
export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.elven.io
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export ELVEN_TENANT_ID=acme
export ELVEN_API_KEY=...

dotnet Billing.Api.dll

OTEL_TRACES_EXPORTER=none, OTEL_METRICS_EXPORTER=none, OTEL_LOGS_EXPORTER=none, and OTEL_TRACES_SAMPLER=always_off are rejected in Elven mode. Logs, metrics, and traces are always on.

Docker Layer

FROM mcr.microsoft.com/dotnet/aspnet:10.0

COPY --from=elvenobs/dotnet-instrumentation:latest /otel /otel

ENV CORECLR_ENABLE_PROFILING=1 \
    CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318} \
    CORECLR_PROFILER_PATH=/otel/current/OpenTelemetry.AutoInstrumentation.Native.so \
    DOTNET_ADDITIONAL_DEPS=/otel/AdditionalDeps \
    DOTNET_SHARED_STORE=/otel/store \
    DOTNET_STARTUP_HOOKS=/otel/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll \
    OTEL_DOTNET_AUTO_HOME=/otel \
    OTEL_DOTNET_AUTO_PLUGINS="Elven.Observability.AutoInstrumentation.ElvenPlugin, Elven.Observability.AutoInstrumentation" \
    OTEL_SERVICE_NAME=minha-app \
    OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.elven.io \
    OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
    OTEL_TRACES_EXPORTER=otlp \
    OTEL_METRICS_EXPORTER=otlp \
    OTEL_LOGS_EXPORTER=otlp \
    ELVEN_TENANT_ID=acme

COPY . /app
ENTRYPOINT ["dotnet", "/app/MyApp.dll"]

Environment Variables

Elven supports standard OTel variables plus these extensions:

  • ELVEN_TENANT_ID: mapped to x-scope-orgid
  • ELVEN_API_KEY: mapped to Authorization: Bearer ...
  • ELVEN_ENVIRONMENT: mapped to deployment.environment.name
  • ELVEN_REGION: mapped to elven.region
  • ELVEN_DEBUG: enables verbose internal diagnostics

Core OTel variables:

  • OTEL_SERVICE_NAME
  • OTEL_SERVICE_VERSION
  • OTEL_RESOURCE_ATTRIBUTES
  • OTEL_EXPORTER_OTLP_ENDPOINT
  • OTEL_EXPORTER_OTLP_PROTOCOL=grpc|http/protobuf
  • OTEL_EXPORTER_OTLP_HEADERS
  • OTEL_TRACES_SAMPLER
  • OTEL_TRACES_SAMPLER_ARG
  • OTEL_TRACES_EXPORTER=otlp
  • OTEL_METRICS_EXPORTER=otlp
  • OTEL_LOGS_EXPORTER=otlp

Coverage

  • Traces: ASP.NET Core, HttpClient, gRPC client, SQL Client, EF Core, MongoDB source registration, RabbitMQ/Kafka/MassTransit source registration, AWS/Azure source registration, manual ActivitySource.
  • Metrics: runtime, process, ASP.NET Core/Kestrel, HttpClient, DNS/TLS/connection meters, Elven internal metrics, trace-based exemplars.
  • Logs: ILogger OTLP exporter, formatted message, scopes, state values, automatic trace/span correlation.
  • Resources: service namespace/version/instance, deployment.environment.name, host, container, Kubernetes, process/runtime, tenant, region.
  • Error mapping: cancellation, timeout, validation, auth, user input, HTTP 4xx/5xx, gRPC status codes, DNS, connection refused, network, DB/provider, startup misconfiguration, unhandled exceptions.

Development

dotnet restore
dotnet build Elven.Observability.sln -c Release
dotnet test Elven.Observability.sln -c Release
dotnet run -c Release --project tests/Elven.Observability.Benchmarks

Native AOT:

dotnet publish samples/NativeAot.WebApi/NativeAot.WebApi.csproj -c Release -r linux-x64

Build the auto-instrumentation layer:

docker buildx build \
  -f docker/auto-instrumentation/Dockerfile \
  --platform linux/amd64,linux/arm64 \
  -t elvenobs/dotnet-instrumentation:latest .

Run the local LGTM stack and send the samples to it:

docker compose -f docker-compose.lgtm.yml up -d
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_SERVICE_NAME=elven-local-sample
dotnet run --project samples/AspNetCore.WebApi/AspNetCore.WebApi.csproj

Open Grafana at http://localhost:3000; the bundled LGTM image receives traces, metrics, and logs over OTLP on 4317 and 4318.

References

  • OpenTelemetry .NET SDK 1.15.3
  • OpenTelemetry .NET AutoInstrumentation 1.15.0
  • OpenTelemetry semantic conventions 1.41.0
  • .NET 8, .NET 9, and .NET 10
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on Elven.Observability.Core:

Package Downloads
Elven.Observability.Instrumentation.EntityFrameworkCore

Entity Framework Core instrumentation helpers for Elven Observability .NET.

Elven.Observability.AspNetCore

ASP.NET Core builder extensions, error mapping middleware, and health checks for Elven Observability .NET.

Elven.Observability.Instrumentation.Sql

SQL instrumentation helpers for Elven Observability .NET.

Elven.Observability.Business

Business operation spans and metrics for Elven Observability .NET services.

Elven.Observability

Meta-package facade for Elven Observability .NET with always-on OpenTelemetry traces, metrics, logs, OTLP exporters, ASP.NET Core, generic host, and no-host initialization.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.13 255 8/17/2026
0.1.12 528 7/8/2026
0.1.11 295 7/7/2026
0.1.10 279 7/7/2026
0.1.9 273 7/6/2026
0.1.8 277 7/6/2026
0.1.7 273 7/6/2026
0.1.6 270 7/3/2026
0.1.5 268 7/2/2026
0.1.4 284 7/2/2026
0.1.3 234 7/2/2026
0.1.2 1,496 5/12/2026
0.1.1 164 5/11/2026
0.1.0 160 5/3/2026

Initial Elven Observability .NET distribution with always-on traces, metrics, logs, OTLP exporters, auto-instrumentation plugin, and LGTM defaults.