PowerCSharp.Operational
1.0.1
dotnet add package PowerCSharp.Operational --version 1.0.1
NuGet\Install-Package PowerCSharp.Operational -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PowerCSharp.Operational" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PowerCSharp.Operational" Version="1.0.1" />
<PackageReference Include="PowerCSharp.Operational" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PowerCSharp.Operational --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PowerCSharp.Operational, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PowerCSharp.Operational@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PowerCSharp.Operational&version=1.0.1
#tool nuget:?package=PowerCSharp.Operational&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PowerCSharp.Operational

Cross-cutting issue capture, in-app diagnostics, structured logging, disk event-log writing, and HTTP retry/circuit-breaker resilience for ASP.NET Core applications — safe to enable or disable at any time.
Pair this package with PowerCSharp.Operational.Abstractions (contracts + NoOp) for the
cross-platform contract surface.
Contents
DiagnosticsService— per-request diagnostics: trace/breadcrumb/exception/error capture, activated via HTTP headers (debug,debugVerbose,traceLevel,eventLog,cacheDisabled,performance— seeDiagnosticHeaders), with sensitive-data masking delegated toPowerCSharp.Feature.Sanitization.Abstractions.IssueManager— centralized exception/error/breadcrumb capture, forwarding toIDiagnosticsService.DiagnosticsLogger/DiagnosticsLoggerProvider— a customILoggerthat forwards to diagnostics and (optionally) a platform event log.EventLogWriter/EventLogRetentionCleaner— background NDJSON disk writer with cross-process file locking, and a companion retention-cleanup sweep.RetryPolicyProvider— Polly-based retry + circuit breaker for outbound HTTP calls, using decorrelated jitter backoff.OperationalServiceCollectionExtensions—AddOperational()/UseOperational()explicit DI wiring.OperationalFeatureModule— optionalPowerCSharp.Featuresauto-discovery module.
Usage
// Program.cs
builder.Services.AddOperational(builder.Configuration);
var app = builder.Build();
app.UseOperational();
// appsettings.json
{
"PowerFeatures": {
"Operational": {
"Enabled": true,
"LogsBasePath": "C:\\Logs",
"LogsRetentionDays": 30
}
}
}
Then, from anywhere with constructor access to IIssueManager / IDiagnosticsService:
public class SomeService(IIssueManager issueManager, IDiagnosticsService diagnostics)
{
public async Task DoWorkAsync()
{
try
{
diagnostics.AddBreadcrumb("Starting work", category: "SomeService");
// ...
}
catch (Exception ex)
{
issueManager.CaptureException(ex);
throw;
}
}
}
Optional: Features Framework integration
builder.Services.AddPowerFeatures(builder.Configuration, options =>
{
options.ScanAssemblies(typeof(OperationalFeatureModule).Assembly);
});
Design notes
- No static service locator. Unlike the source implementation this package was built from,
IDiagnosticsServiceandIIssueManagerare constructor-injected. The one deliberate exception isDiagnosticsLogger, which resolvesIDiagnosticsServicefromHttpContext.RequestServicesat each log call — the standard, narrowly-scoped pattern for bridging a singleton-lifetimeILoggerto per-request scoped services, not a general-purpose locator. EventLogWriteris a DI singleton, not a hand-rolled staticInstance— every dependency it needs is itself singleton-safe.- Correlation id is a known v1 gap, marked with
// TODOat each call site. No PowerCSharp correlation-id abstraction exists yet; this is tracked for a future phase rather than silently dropped or half-ported from a Sentry-coupled origin. - No Windows Event Log code lives in this package.
IEventViewerServicedefaults toNoOpEventViewerService; a futurePowerCSharp.Operational.WinEventLogprovider package supplies the real Windows implementation. Seedocs/PowerCSharp.Operational.Architecture.md.
Details
- Package ID:
PowerCSharp.Operational - Depends on:
PowerCSharp.Operational.Abstractions,PowerCSharp.Features.Abstractions,PowerCSharp.Feature.Sanitization.Abstractions,Polly - Target framework:
net8.0(requires an ASP.NET Core host)
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Polly (>= 8.6.1)
- Polly.Core (>= 8.6.1)
- PowerCSharp.Feature.Sanitization.Abstractions (>= 1.0.0)
- PowerCSharp.Features.Abstractions (>= 1.0.3)
- PowerCSharp.Operational.Abstractions (>= 1.0.1)
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.1 | 0 | 8/25/2026 |