DevLite 0.1.5

dotnet add package DevLite --version 0.1.5
                    
NuGet\Install-Package DevLite -Version 0.1.5
                    
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="DevLite" Version="0.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevLite" Version="0.1.5" />
                    
Directory.Packages.props
<PackageReference Include="DevLite" />
                    
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 DevLite --version 0.1.5
                    
#r "nuget: DevLite, 0.1.5"
                    
#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 DevLite@0.1.5
                    
#: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=DevLite&version=0.1.5
                    
Install as a Cake Addin
#tool nuget:?package=DevLite&version=0.1.5
                    
Install as a Cake Tool

DevLite .NET SDK

Official .NET SDK for DevLite — AI-powered observability. Mirror of the devlite-java (Maven Central), @devlite/nodejs (npm), devlite (PyPI), and devlite-go SDKs: add two lines, get automatic request tracking, error capture, error grouping, source context, user tracking, and slow-endpoint detection.

Zero third-party dependencies. Requires .NET 8+. ASP.NET Core integration is optional and uses the shared framework.

Install

Add the DevLite package (from NuGet):

dotnet add package DevLite --version 0.1.5

Quickstart

using DevLite;

DevLiteClient.Init("dl_live_xxxxx");
// ... your app ...

That's it. Register the middleware to get automatic request tracking:

// Program.cs
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.UseMiddleware<DevLiteMiddleware>();

app.Run();

Manual API

// Capture an error (a crash anywhere outside an HTTP request)
DevLiteClient.CaptureError(ex, new Dictionary<string, object?> { ["route"] = "/checkout" });

// Non-error event
DevLiteClient.CaptureMessage("warning", "Payment retried after timeout", new Dictionary<string, object?> { ["attempts"] = 3 });

// Metric (feeds forecasting / anomaly detection)
DevLiteClient.ReportMetric("orders.total", 42.5, "USD", new Dictionary<string, string?> { ["region"] = "eu" });

// Structured log
DevLiteClient.CaptureLog("info", "job finished", new Dictionary<string, object?> { ["job"] = "nightly-backup" });

// Deployment marker (exempt from sampling)
DevLiteClient.ReportDeployment("v2.3.1", "abc123", "scale-out");

// Breadcrumbs attach to the next captured error
DevLiteClient.AddBreadcrumb(new Dictionary<string, object?> { ["type"] = "info", ["message"] = "fetching user" });

// User impact tracking (scoped to the current request) — tags merge into each error's `extra`
DevLiteClient.SetUser(new Dictionary<string, object?> { ["id"] = "u-42", ["email"] = "dev@example.com" });
DevLiteClient.SetTag("region", "lagos");

// Trace span
var span = DevLiteClient.StartSpan("card.charge", new Dictionary<string, object?> { ["paymentMethod"] = "visa" });
// ... work ...
span.End("ok");

Distributed tracing — inbound, zero config

DevLiteMiddleware continues an incoming W3C traceparent header automatically (the header the Node SDK injects on every outbound call, or any OpenTelemetry-compatible caller). Your request adopts the caller's traceId, parents into their span (parentId), and honors their sampling bit — so a request that crosses services shows up as one linked span tree in the dashboard, not a set of orphaned events.

Node service ──traceparent──▶ .NET service
      (injects W3C header)      (DevLiteMiddleware continues: same traceId, parentId, sampled)

Requests without a header start a fresh, self-contained trace as before.

Configuration

DevLiteClient.Init(DevLiteConfig.CreateBuilder()
    .ApiKey("dl_live_xxxxx")
    .ServiceName("checkout-api")
    .Environment("production")
    .Release("v2.3.1")
    .SampleRate(0.25)          // coherent sampling: 25% of requests
    .CaptureHeaders(true)      // includes redacted request headers
    .BeforeSend(ev =>          // run on EVERY event right before enqueue:
    {
        // mutate to enrich...
        ev["runtime"] = "net8";
        // ...or return null to drop (e.g. filter health checks)
        return ev;
    })
    .Debug(true)
    .Build());

Environment variables are also honored: DEVLITE_API_KEY, DEVLITE_SERVICE_NAME, DEVLITE_ENVIRONMENT, DEVLITE_RELEASE.

What you get automatically

  • Every request tracked: method, path, status, duration — plus a slow_request event when it exceeds 1s
  • W3C distributed tracing — inbound traceparent headers are continued automatically, joining your service into the caller's trace
  • BeforeSend hook per event — mutate to enrich, return null to drop, safely
  • Errors captured without being swallowed; fatal uncaught exceptions link to the failing request
  • Stable SHA-1 fingerprints so the same bug groups into one issue
  • Source code context read live from disk (best-effort, cached)
  • Emails, JWTs, bearer tokens, AWS keys, credit card numbers, and sensitive-keyed values redacted before leaving your process
  • Bounded queue (max 5000, drop-oldest) and gzip batching to https://monitoring-devlite.andasy.dev/v1/events with exponential-backoff retries
  • The User-Agent is always devlite-dotnet/0.1.5 so the WAF never blocks telemetry

Building

dotnet test DevLite.sln
dotnet pack src/DevLite/DevLite.csproj -c Release
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 was computed.  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 was computed.  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.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.5 48 9/13/2026
0.1.4 88 9/1/2026
0.1.3 109 8/16/2026
0.1.2 103 8/14/2026
0.1.0 103 8/8/2026