DevLite 0.1.2
See the version list below for details.
dotnet add package DevLite --version 0.1.2
NuGet\Install-Package DevLite -Version 0.1.2
<PackageReference Include="DevLite" Version="0.1.2" />
<PackageVersion Include="DevLite" Version="0.1.2" />
<PackageReference Include="DevLite" />
paket add DevLite --version 0.1.2
#r "nuget: DevLite, 0.1.2"
#:package DevLite@0.1.2
#addin nuget:?package=DevLite&version=0.1.2
#tool nuget:?package=DevLite&version=0.1.2
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.0
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)
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");
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
.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_requestevent when it exceeds 1s - 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://devlite.andasy.dev/v1/eventswith exponential-backoff retries - The User-Agent is always
devlite-dotnet/0.1.0so the WAF never blocks telemetry
Building
dotnet test DevLite.sln
dotnet pack src/DevLite/DevLite.csproj -c Release
| Product | Versions 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. |
-
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.