ErrorSight.SDK.Net40
1.0.0
dotnet add package ErrorSight.SDK.Net40 --version 1.0.0
NuGet\Install-Package ErrorSight.SDK.Net40 -Version 1.0.0
<PackageReference Include="ErrorSight.SDK.Net40" Version="1.0.0" />
<PackageVersion Include="ErrorSight.SDK.Net40" Version="1.0.0" />
<PackageReference Include="ErrorSight.SDK.Net40" />
paket add ErrorSight.SDK.Net40 --version 1.0.0
#r "nuget: ErrorSight.SDK.Net40, 1.0.0"
#:package ErrorSight.SDK.Net40@1.0.0
#addin nuget:?package=ErrorSight.SDK.Net40&version=1.0.0
#tool nuget:?package=ErrorSight.SDK.Net40&version=1.0.0
ErrorSight SDK for .NET Framework 4.0
ErrorSight is an observability SDK that captures logs, exceptions, and active window screenshots from .NET Framework 4.0 applications. It is designed for WinForms and WPF desktop software that needs real-time error tracking without upgrading the runtime.
The SDK sends data to the ErrorSight API over HTTPS using OAuth2 authentication. You can either self-host the backend or use the hosted service.
Features
- Log levels: Debug, Info, Warn, Error, Fatal
- Automatic screenshot capture of the active window on errors
- Global exception handling for AppDomain and WinForms
- OAuth2 client credentials flow
- Batch sending with background queue
- Proxy support for corporate environments
- App.config integration
- Configurable sampling and filtering via
BeforeSendevents
Requirements
- .NET Framework 4.0 or higher
Newtonsoft.Json13.0.4- An ErrorSight API endpoint (self-hosted or hosted)
Installation
Install via NuGet Package Manager:
Install-Package ErrorSight.SDK.Net40
Or via the NuGet CLI:
nuget install ErrorSight.SDK.Net40
Configuration
Option A: App.config
Add the following keys to your App.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="ErrorSight:ApiBaseUrl" value="https://api.errorsight.io"/>
<add key="ErrorSight:OAuthTokenUrl" value="https://auth.errorsight.io/oauth/token"/>
<add key="ErrorSight:ClientId" value="your-client-id"/>
<add key="ErrorSight:ClientSecret" value="your-client-secret"/>
<add key="ErrorSight:ProjectKey" value="my-app-v1"/>
<add key="ErrorSight:ScreenshotFormat" value="Base64"/>
<add key="ErrorSight:CaptureOnlyOnError" value="true"/>
<add key="ErrorSight:BatchSize" value="10"/>
<add key="ErrorSight:FlushIntervalMs" value="5000"/>
<add key="ErrorSight:RequestTimeoutMs" value="30000"/>
</appSettings>
</configuration>
Then initialize:
ErrorSight.SDK.Core.ErrorSightClient.InitializeFromAppSettings();
Option B: Code
using ErrorSight.SDK.Core;
using ErrorSight.SDK.Models;
var config = new ErrorSightConfig
{
ApiBaseUrl = "https://api.errorsight.io",
OAuthTokenUrl = "https://auth.errorsight.io/oauth/token",
ClientId = "your-client-id",
ClientSecret = "your-client-secret",
ProjectKey = "my-app-v1",
ScreenshotFormat = ScreenshotFormat.Base64,
CaptureOnlyOnError = true,
BatchSize = 10,
FlushIntervalMs = 5000
};
ErrorSightClient.Initialize(config);
Usage
Basic Logging
ErrorSightClient.LogInfo("Application started");
ErrorSightClient.LogDebug("User clicked save", new Dictionary<string, object>
{
{ "Form", "MainForm" },
{ "UserId", 42 }
});
Exception Handling
try
{
// risky operation
}
catch (Exception ex)
{
ErrorSightClient.LogError(ex, new Dictionary<string, object>
{
{ "Operation", "DatabaseSave" }
});
}
Global Exception Handlers
Attach once during application startup:
ErrorSightExceptionHandler.AttachAppDomain();
ErrorSightExceptionHandler.AttachWinForms();
This captures unhandled exceptions and thread exceptions automatically.
BeforeSend Callback
Filter or mutate logs before they are sent:
ErrorSightClient.BeforeSend += (sender, e) =>
{
if (e.Entry.Message.Contains("password"))
e.Cancel = true;
};
Shutdown
Call on application exit to flush the queue:
ErrorSightClient.Shutdown();
Backend Options
The SDK communicates with a Go-based backend. Two deployment models are available.
1. Self-Hosted (Open Source)
Host the backend on your own infrastructure using Docker.
Docker Compose
services:
errorsight-api:
image: ghcr.io/errorsight/errorsight-api:latest
ports:
- "8080:8080"
environment:
- ES_DATABASE_DSN=postgres://errorsight:secret@db:5432/errorsight?sslmode=disable
- ES_OAUTH_ISSUER=https://auth.errorsight.io
- ES_STORAGE_PATH=/data/screenshots
volumes:
- ./data:/data
depends_on:
- db
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: errorsight
POSTGRES_PASSWORD: secret
POSTGRES_DB: errorsight
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
Clone the backend repository and build the image:
git clone https://github.com/errorsight/errorsight-api.git
cd errorsight-api
docker build -t errorsight-api .
2. Hosted Service
The managed multitenant version is available at https://errorsight.io. Sign up to receive your OAuth2 credentials and project key.
Support
For bug reports and feature requests, open an issue on GitHub.
If you find ErrorSight useful, consider supporting development via Ko-fi:
For enterprise inquiries, contact: contact@errorsight.io
License
MIT License
Copyright (c) 2026 ErrorSight by Aztekode. Developed by Eddy Ortega (atrox39).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.0
- Newtonsoft.Json (>= 13.0.4)
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 |
|---|---|---|
| 1.0.0 | 33 | 8/7/2026 |
Initial release. Supports log levels, exception tracking, active window screenshots, OAuth2, batch sending, and global exception handlers.