Before you start
Create the project with the .NET / ASP.NET Core integration type.
| What you need | Why it matters |
|---|---|
| Project API token | Authenticates the app when sending events |
| Logister instance base URL | Used to build the ingest, check-in, and deployment endpoints |
| .NET 8+ app | Lets you use the first Logister .NET SDK packages |
| Optional GitHub App installation | Lets Logister use Repository, CommitSha, Branch, and deployment records for source excerpts and deploy links |
What you get
Use the .NET integration to make ASP.NET Core failures and deploys easier to act on.
| Need | What appears in Logister |
|---|---|
| Catch uncaught request exceptions | Inbox issues with .NET exception details, stack frames, request URL, request ID, trace ID, user ID, framework metadata, and runtime metadata. |
| Understand failed ASP.NET requests | A .NET-focused detail view with stack, query, optional cookies, headers, routing, runtime, inner exceptions, and exception data when captured. |
| Track request latency | Request transaction events and optional request spans that power project performance and request load waterfall charts. |
| Monitor workers and business signals | Metrics, logs, custom transactions, spans, and check-ins from injected LogisterClient calls. |
| Resolve source and deploy history | Repository, CommitSha, Branch, release, and deployment records that let Logister show source excerpts, GitHub links, and "started after deploy" context when a GitHub repository is connected to the project. |
| Connect traces and logs | Release, request ID, trace ID, session ID, and user ID context that helps Logister show release health and related logs. |
Install
Install the base client or ASP.NET Core package from NuGet.
Use the published NuGet packages when you want a .NET service to send errors, logs, metrics, transactions, spans, and check-ins into Logister. The NuGet listings are the canonical package pages for install commands, version history, and package metadata.
dotnet add package Logister
dotnet add package Logister.AspNetCorePackage links: NuGet Logister, NuGet Logister.AspNetCore, and GitHub. For local development, forks, or unreleased SDK changes, reference the project from that repo directly.
<ProjectReference Include="../logister-dotnet/src/Logister/Logister.csproj" />
<ProjectReference Include="../logister-dotnet/src/Logister.AspNetCore/Logister.AspNetCore.csproj" />ASP.NET Core
Capture uncaught exceptions and optional request transactions.
using Logister.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddLogister(builder.Configuration, options =>
{
options.Client.DefaultContext["service"] = "quriatime-web";
options.Client.Repository = "acme/timesheets";
options.Client.CommitSha = Environment.GetEnvironmentVariable("GITHUB_SHA");
options.Client.Branch = Environment.GetEnvironmentVariable("GITHUB_REF_NAME");
options.CaptureRequestSpans = true;
});
var app = builder.Build();
app.UseLogisterExceptionReporting();
app.UseLogisterRequestTransactions();The exception middleware captures structured .NET exception details, stack frames when available, inner exceptions, Exception.Data, request URL, request ID, trace ID, user ID, framework metadata, and runtime metadata. Request transactions record total request duration; request spans add the root server timing used by request load waterfall charts.
Custom events
Use the injected client for metrics and events you choose.
public sealed class ApprovalService(LogisterClient logister)
{
public async Task RecordQueueDepthAsync(int pending)
{
await logister.CaptureMetricAsync(
"timesheet.approvals.pending",
pending,
new MetricOptions { Unit = "count" });
await logister.CaptureSpanAsync(
"approval queue db load",
42.6,
new SpanOptions
{
Kind = "db",
Status = "ok",
TraceId = "trace-123",
ParentSpanId = "span-root",
Context = new Dictionary<string, object?>
{
["queue"] = "approvals"
}
});
await logister.CheckInAsync(
"nightly-import",
"ok",
new CheckInOptions
{
Release = "worker@2026.05.21",
ExpectedIntervalSeconds = 3600,
DurationMs = 122.5,
TraceId = "trace-123",
RequestId = "req-123"
});
}
}The same client supports CaptureExceptionAsync(), CaptureMessageAsync(), CaptureMetricAsync(), CaptureTransactionAsync(), CaptureSpanAsync(), CheckInAsync(), and RecordDeploymentAsync(). Capture options support per-event environment, release, trace ID, request ID, session ID, and user ID fields; span options add span ID, parent span ID, kind, status, and start/end timestamps; check-ins also send top-level release and monitor timing metadata to match the HTTP API.
Source and deployments
Set source context once, then record each deployed commit.
If the project is connected to the GitHub App, Logister can use source context to resolve .NET stack frames to repository files. Deployment records map a release and environment to the exact commit shipped by CI/CD.
await client.RecordDeploymentAsync(new DeploymentOptions
{
Release = "timesheets@2026.06.18",
Environment = "production",
Repository = "acme/timesheets",
CommitSha = "4f8c2d1a9b7e6c5d4a3b2c1d0e9f8a7b6c5d4e3f",
Branch = "main",
DeployedAt = DateTimeOffset.UtcNow,
ReleaseTag = "v2026.06.18",
WorkflowRunUrl = "https://github.com/acme/timesheets/actions/runs/123"
});| Field | Set it from | Used for |
|---|---|---|
Repository | LOGISTER_REPOSITORY or GITHUB_REPOSITORY | Finds the GitHub repository connected to the project. |
CommitSha | LOGISTER_COMMIT_SHA or GITHUB_SHA | Resolves stack frames and deployment context to the exact commit. |
Branch | LOGISTER_BRANCH or GITHUB_REF_NAME | Falls back when an event has no commit or deployment record yet. |
Release | Your app version, build ID, tag, or package version | Connects event filters, release health, and deployments. |
Verify it
After a deploy, send one test exception with the same Release. Open the event detail and check for source lookup status, deployment context, and GitHub links. If source is missing, confirm the GitHub App is installed, linked to the project, and the repository is connected; then check that the event has repository plus either commit_sha or a matching deployment record.
Configuration
Configure with appsettings or environment variables.
{
"Logister": {
"ApiKey": "your-project-api-token",
"BaseUrl": "https://your-logister-host.example",
"Environment": "production",
"Release": "quriatime@2026.06.18",
"Repository": "acme/quriatime",
"CommitSha": "4f8c2d1a9b7e6c5d4a3b2c1d0e9f8a7b6c5d4e3f",
"Branch": "main",
"CaptureRequestTransactions": true,
"CaptureRequestSpans": true
}
}The base client also reads LOGISTER_API_KEY, LOGISTER_BASE_URL, LOGISTER_ENVIRONMENT, LOGISTER_RELEASE, LOGISTER_REPOSITORY, LOGISTER_COMMIT_SHA, LOGISTER_BRANCH, and LOGISTER_TIMEOUT. In GitHub Actions it falls back to GITHUB_REPOSITORY, GITHUB_SHA, and GITHUB_REF_NAME when the Logister-specific source variables are not set.