TCIS.Observability.Classification
1.0.8-rc.11
dotnet add package TCIS.Observability.Classification --version 1.0.8-rc.11
NuGet\Install-Package TCIS.Observability.Classification -Version 1.0.8-rc.11
<PackageReference Include="TCIS.Observability.Classification" Version="1.0.8-rc.11" />
<PackageVersion Include="TCIS.Observability.Classification" Version="1.0.8-rc.11" />
<PackageReference Include="TCIS.Observability.Classification" />
paket add TCIS.Observability.Classification --version 1.0.8-rc.11
#r "nuget: TCIS.Observability.Classification, 1.0.8-rc.11"
#:package TCIS.Observability.Classification@1.0.8-rc.11
#addin nuget:?package=TCIS.Observability.Classification&version=1.0.8-rc.11&prerelease
#tool nuget:?package=TCIS.Observability.Classification&version=1.0.8-rc.11&prerelease
TCIS.Observability.Classification
A lightweight, zero-dependency .NET library that provides a standardized Exception Classification Taxonomy for enterprise applications. It categorizes runtime exceptions by Failure Category, Operational Owner, Infrastructure Dependency, Support Level, and Machine Error Code.
Key Features
- Standardized Exception Taxonomy: Categorizes failures into
Infrastructure,Developer,Business,Security, orUnknown. - Operational Ownership & Escalation: Identifies the responsible team (
Ops,Dev,Business,Security) and Support Level (L1,L2,L3). - Dependency Tracking: Maps failures to underlying infrastructure (
Database,Cache,Kafka,RabbitMQ,Redis,Http, etc.). - Smart Exception Unwrapping: Automatically inspects
InnerExceptionchains up to depth 8 while respecting terminal domain/protocol boundaries (e.g.,TCISvalidation exceptions,gRPCRPC exceptions, SOAP faults). - Loose-Coupled Rules Engine: Includes built-in rules for standard .NET BCL exceptions and type-name matching without requiring hard references to specific database or messaging packages.
- SIEM / Log Tagging: Formats classification metadata into compact, greppable log prefixes for Serilog, Grafana, and Kibana.
Architecture Overview
[ Runtime Exception ]
│
▼
CompositeExceptionClassifier
│
(Smart Unwrap Chain)
│
▼
┌───────────────────┴───────────────────┐
│ │
▼ ▼
BclExceptionRule TypeNameExceptionRule
(Priority: 900) (Priority: 950)
.NET Core BCL Errors Dynamic Type Matching
│ │
└───────────────────┬───────────────────┘
│
▼
ExceptionClassification
┌─────────────────────────────────┐
│ Category : Infrastructure │
│ Owner : Ops │
│ Dependency: Database │
│ Support : L3 (On-Call) │
│ ErrorCode : INFRA_DB_TIMEOUT │
└─────────────────────────────────┘
Installation
Add the project reference or NuGet package:
dotnet add package TCIS.Observability.Classification
Registration & Dependency Injection
Register exception classification services in Program.cs:
using TCIS.Observability.Classification;
var builder = WebApplication.CreateBuilder(args);
// Register default exception classifier and built-in rules
builder.Services.AddExceptionClassification();
// (Optional) Register custom domain exception rules
builder.Services.AddExceptionClassifierRule<MyCustomDomainExceptionRule>();
Usage Examples
Shared diagnostic severity policy
TExceptionLogPolicy.Decide(exception, classification, cancellationRequested) returns
an immutable Models.ExceptionLogDecision for diagnostics owned by TCIS:
| Failure | Level | TCIS log type | Outcome |
|---|---|---|---|
| None | INFO | event | success |
| Recognized input/validation/business failure | WARN | event | failure |
| Infrastructure, configuration, developer bug or unknown failure | ERROR | error | failure |
| Operation cancelled by the owning caller/shutdown token | INFO | event | unknown |
ExceptionClassification classification = classifier.Classify(exception);
var decision = TExceptionLogPolicy.Decide(exception, classification,
cancellationRequested: cancellationToken.IsCancellationRequested);
// The adapter puts decision.Level, LogType and Outcome on its diagnostic record.
// Keep the original exception details and classification on that same record.
A classification without an exception represents a failed protocol/status result.
TCIS taxonomy prefixes take precedence over coarse type-based classification:
CONFIG_, SYS_ and INFRA_ remain errors even if a rule calls their exception business.
An unrequested cancellation or timeout remains an error. Adapters retain configured
success levels and source-specific access/audit roles; this policy does not emit
logs, configure a sink, alter framework log levels or mutate the exception/classification.
Security diagnostic classification remains separate from business classification;
protected security/audit records continue through their dedicated policies.
1. Classifying Exceptions in Services or Middleware
using TCIS.Observability.Classification;
public class OrderService
{
private readonly IExceptionClassifier _classifier;
private readonly ILogger<OrderService> _logger;
public OrderService(IExceptionClassifier classifier, ILogger<OrderService> logger)
{
_classifier = classifier;
_logger = logger;
}
public async Task ProcessOrderAsync(OrderRequest request)
{
try
{
await ExecuteOrderPipelineAsync(request);
}
catch (Exception ex)
{
ExceptionClassification classification = _classifier.Classify(ex);
// Log operational metadata
_logger.LogError(ex, "[{Provider}] Order processing failed: {LogPrefix}",
"order-service",
classification.ToOperationalLogPrefix());
if (classification.Retryable)
{
// Schedule retry for transient infrastructure failures
}
throw;
}
}
}
2. Creating Custom Classification Rules
To add domain-specific classification rules, implement IExceptionClassifierRule:
using TCIS.Observability.Classification;
public class CustomPaymentExceptionRule : IExceptionClassifierRule
{
public int Priority => 500; // Lower number = higher priority
public bool TryClassify(Exception exception, out ExceptionClassification? classification)
{
if (exception is PaymentGatewayTimeoutException gatewayEx)
{
classification = new ExceptionClassification(
Category: ExceptionCategory.Infrastructure,
Owner: ExceptionOwner.Ops,
Dependency: ExceptionDependency.Http,
Retryable: true,
ErrorCode: "PAYMENT_GATEWAY_TIMEOUT",
PublicMessageKey: MessageKeys.SystemTemporarilyUnavailable,
ExceptionType: gatewayEx.GetType().Name,
SupportLevel: SupportLevel.L3
);
return true;
}
classification = null;
return false;
}
}
Exception Categories & Support Tiers
| Category | Owner | Support Level | Typical Causes |
|---|---|---|---|
Infrastructure |
Ops |
L3 |
DB timeouts, Redis disconnects, Network sockets, Kafka downtime |
Developer |
Dev |
L2 |
NullReferenceException, ArgumentException, InvalidOperationException |
Business |
Business |
L1 |
Domain validation, Insufficient funds, Out of stock |
Security |
Security |
L3 |
Authentication failure, Unauthorized access, Token expired |
Unknown |
Unknown |
L2 |
Unhandled / Unmapped exceptions |
License
Internal Enterprise Library — TCIS Core Platform Framework.
Ecosystem logging contract
See severity, readiness, diagnostic ownership and migration.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 8.0.6)
- TCIS.Core (= 1.0.8-rc.11)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- TCIS.Core (= 1.0.8-rc.11)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on TCIS.Observability.Classification:
| Package | Downloads |
|---|---|
|
TCIS.Logging.Abstractions
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Logging abstractions for TCIS Framework. |
|
|
TCIS.Logging
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Logging services and integration for TCIS Framework. |
|
|
TCIS.AspNetCore
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. ASP.NET Core integration for TCIS Framework. |
|
|
TCIS.Persistence.EntityFrameworkCore
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Core Persistence EntityFrameworkCore implementation. |
|
|
TCIS.Http.Grpc
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. gRPC client and server integration for TCIS Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.8-rc.11 | 0 | 10/30/2026 |
| 1.0.8-rc.10 | 0 | 10/30/2026 |
| 1.0.8-rc.9 | 0 | 10/30/2026 |
| 1.0.8-rc.8 | 40 | 10/29/2026 |
| 1.0.8-rc.7 | 98 | 10/27/2026 |
| 1.0.8-rc.6 | 101 | 10/27/2026 |
| 1.0.8-rc.5 | 149 | 10/23/2026 |
| 1.0.8-rc.4 | 160 | 10/23/2026 |
| 1.0.8-rc.3 | 154 | 10/23/2026 |
| 1.0.8-rc.2 | 145 | 10/22/2026 |
| 1.0.8-rc.1 | 147 | 10/22/2026 |
| 1.0.7 | 301 | 10/22/2026 |
| 1.0.6 | 480 | 10/20/2026 |
| 1.0.6-rc.1 | 136 | 10/20/2026 |
| 1.0.5 | 472 | 10/19/2026 |
| 1.0.4 | 453 | 10/13/2026 |
| 1.0.3 | 450 | 10/13/2026 |
| 1.0.2 | 467 | 10/12/2026 |
| 1.0.2-rc.1 | 150 | 10/12/2026 |
| 1.0.1-rc.10 | 181 | 10/8/2026 |