Ditliti 0.1.2
dotnet add package Ditliti --version 0.1.2
NuGet\Install-Package Ditliti -Version 0.1.2
<PackageReference Include="Ditliti" Version="0.1.2" />
<PackageVersion Include="Ditliti" Version="0.1.2" />
<PackageReference Include="Ditliti" />
paket add Ditliti --version 0.1.2
#r "nuget: Ditliti, 0.1.2"
#:package Ditliti@0.1.2
#addin nuget:?package=Ditliti&version=0.1.2
#tool nuget:?package=Ditliti&version=0.1.2
Ditliti (.NET SDK)
Official .NET SDK for Ditliti - error tracking, tracing, session replay, and profiling ingestion.
This SDK talks to a self-hosted Ditliti instance (ingestion-api). It does not connect to any managed/hosted service - point it at your own deployment's ingestion URL.
Install
mkdir -p .ditliti/packages
curl -fsSL https://github.com/kangartha/inspectora/releases/download/sdk-v0.1.2/Ditliti.0.1.2.nupkg -o .ditliti/packages/Ditliti.0.1.2.nupkg
dotnet add package Ditliti --version 0.1.2 --source .ditliti/packages
Use nuget.org as the source only after version 0.1.2 is confirmed there.
Quick start
using Ditliti;
var client = new DitlitiClient(
endpoint: "http://localhost:8305",
apiKey: "mp_xxx",
projectId: "PROJECT_UUID",
release: "1.2.3",
environment: "production");
try
{
RiskyOperation();
}
catch (Exception ex)
{
await client.CaptureExceptionAsync(ex, context: new { extra = "context" });
}
API
new DitlitiClient(endpoint, apiKey, projectId, release, environment, http)client.SetUser(user)/client.SetSession(sessionId)client.AddBreadcrumb(message, category, level, data)client.CaptureExceptionAsync(exception, context, tags, cancellationToken)client.CaptureAspNetCoreExceptionAsync(exception, method, path, userAgent, routeValues, cancellationToken)client.CaptureMessageAsync(message, level, context, tags, cancellationToken)client.CaptureReplaySegmentAsync(durationMs, sessionId, segmentIndex, events, tags, cancellationToken)client.CaptureProfileAsync(durationMs, traceId, transaction, samples, tags, cancellationToken)client.SendEnvelopeAsync(envelope, cancellationToken)- low-level batch submit.
Distributed tracing
Generates real W3C traceparent (https://www.w3.org/TR/trace-context/) trace context, so a trace can be propagated across service/microservice boundaries instead of staying siloed per project:
// Service A: start a trace and call Service B, forwarding the header.
client.StartTrace();
request.Headers.Add("traceparent", client.GetTraceparent());
// Service B: continue the same trace from the inbound header.
client.StartTrace(Request.Headers["traceparent"]);
var span = client.StartSpan("db.query", new Dictionary<string, string> { ["db"] = "postgres" });
// ... do the work ...
await span.FinishAsync();
// CaptureExceptionAsync/CaptureMessageAsync automatically tag trace_id when a trace is active,
// so errors show up correlated to the trace at GET /api/v1/traces/:trace_id (org-wide).
client.StartTrace(string? incomingTraceparent = null)- starts a new trace, or continues one from an inboundtraceparentheader.client.GetTraceparent()- the header value to forward on outgoing requests.client.StartSpan(operationName, tags)→Span.FinishAsync(extraTags, cancellationToken).
Database query instrumentation (Database Insights)
DbTracing wraps a query with a db.query span carrying the OpenTelemetry-shaped attributes the backend uses for Database Insights (slow query / N+1 / error-rate / regression detection). The server parameterizes and hashes db.query.text itself - send the real SQL text, never a redacted one. Built on System.Data.Common (base class library, no EF Core or provider package required), so it works with any ADO.NET provider:
// Generic wrapper - works for any driver/ORM call:
var orders = await DbTracing.TraceQueryAsync(client, "postgresql", "SELECT * FROM orders WHERE id = $1",
() => LoadOrdersAsync(orderId));
// Or trace a DbCommand directly:
using var reader = await command.ExecuteReaderTracedAsync(client, "postgresql");
For EF Core specifically, implement a DbCommandInterceptor in your application (EF Core is intentionally not a dependency of this package) using the same primitive:
public sealed class DitlitiCommandInterceptor : DbCommandInterceptor
{
private readonly DitlitiClient _client;
public DitlitiCommandInterceptor(DitlitiClient client) => _client = client;
public override async ValueTask<InterceptionResult<DbDataReader>> ReaderExecutingAsync(
DbCommand command, CommandEventData eventData, InterceptionResult<DbDataReader> result, CancellationToken cancellationToken = default)
{
await command.ExecuteReaderTracedAsync(_client, "postgresql", cancellationToken: cancellationToken);
return result; // let EF Core's own pipeline continue as normal
}
}
// options.AddInterceptors(new DitlitiCommandInterceptor(client));
Neither ever sets db.query.summary or ditliti.query_hash (server-computed). On failure they record error.type and rethrow the original exception unchanged; on success they record db.response.returned_rows (from an int result or ICollection.Count, or via the rowCount callback).
License
MIT - see LICENSE.
| 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.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.2 | 134 | 7/15/2026 |