TCIS.Observability.Classification
1.0.0-rc.33
dotnet add package TCIS.Observability.Classification --version 1.0.0-rc.33
NuGet\Install-Package TCIS.Observability.Classification -Version 1.0.0-rc.33
<PackageReference Include="TCIS.Observability.Classification" Version="1.0.0-rc.33" />
<PackageVersion Include="TCIS.Observability.Classification" Version="1.0.0-rc.33" />
<PackageReference Include="TCIS.Observability.Classification" />
paket add TCIS.Observability.Classification --version 1.0.0-rc.33
#r "nuget: TCIS.Observability.Classification, 1.0.0-rc.33"
#:package TCIS.Observability.Classification@1.0.0-rc.33
#addin nuget:?package=TCIS.Observability.Classification&version=1.0.0-rc.33&prerelease
#tool nuget:?package=TCIS.Observability.Classification&version=1.0.0-rc.33&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
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.
| 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- TCIS.Core (>= 1.0.0-rc.33)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on TCIS.Observability.Classification:
| Package | Downloads |
|---|---|
|
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.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. |
|
|
TCIS.Http.RestEase
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. RestEase client 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. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.33 | 27 | 8/21/2026 |
| 1.0.0-rc.32 | 25 | 8/21/2026 |
| 1.0.0-rc.31 | 42 | 8/21/2026 |
| 1.0.0-rc.30 | 34 | 8/21/2026 |
| 1.0.0-rc.29 | 38 | 8/21/2026 |
| 1.0.0-rc.28 | 46 | 8/21/2026 |
| 1.0.0-rc.27 | 33 | 8/21/2026 |
| 1.0.0-rc.26 | 78 | 8/20/2026 |
| 1.0.0-rc.25 | 79 | 8/20/2026 |
| 1.0.0-rc.24 | 72 | 8/20/2026 |
| 1.0.0-rc.23 | 93 | 8/20/2026 |
| 1.0.0-rc.22 | 106 | 8/19/2026 |
| 1.0.0-rc.21 | 102 | 8/19/2026 |
| 1.0.0-rc.20 | 132 | 8/18/2026 |
| 1.0.0-rc.19 | 141 | 8/13/2026 |
| 1.0.0-rc.18 | 139 | 8/13/2026 |
| 1.0.0-rc.17 | 137 | 8/13/2026 |
| 1.0.0-rc.16 | 150 | 8/13/2026 |
| 1.0.0-rc.15 | 142 | 8/12/2026 |
| 1.0.0-rc.14 | 146 | 8/12/2026 |