CerbiStream 1.1.62
See the version list below for details.
dotnet add package CerbiStream --version 1.1.62
NuGet\Install-Package CerbiStream -Version 1.1.62
<PackageReference Include="CerbiStream" Version="1.1.62" />
<PackageVersion Include="CerbiStream" Version="1.1.62" />
<PackageReference Include="CerbiStream" />
paket add CerbiStream --version 1.1.62
#r "nuget: CerbiStream, 1.1.62"
#:package CerbiStream@1.1.62
#addin nuget:?package=CerbiStream&version=1.1.62
#tool nuget:?package=CerbiStream&version=1.1.62
CerbiStream — Governance-Enforced Structured Logging for .NET
CerbiStream helps teams produce safe, standardized, and ML-ready logs. It enforces governance policies at runtime (redaction, tagging, validation) before logs reach any sink, while integrating with existing logging frameworks such as Microsoft.Extensions.Logging and Serilog.
This README is ordered for new users: quick overview, why it matters, how to get started, key features, integrations, performance, security & compliance, docs and troubleshooting, and business/technical selling points.
Quick summary (What is CerbiStream?)
- A runtime logging layer that validates, tags, and redacts structured logs according to a policy.
- Works as a wrapper around your existing logging pipeline (MEL, Serilog plugins available).
- Keeps logging fast (sub-microsecond overhead for governance checks in typical cases) and consistent for downstream analytics and ML.
Developer-friendly additions (recent)
We added several small, low-risk features to make adoption and development easier. These are enabled by default when you use the quick registration helper below.
AddCerbiStreamconvenience registrationTwo overloads:
AddCerbiStream(this ILoggingBuilder, Action<CerbiStreamOptions>)— pass options with fluent API.AddCerbiStream(this ILoggingBuilder)— default, opinionated registration.Registers
CerbiStreamOptions, theCerbiStreamLoggerProvider, aRuntimeGovernanceValidatorand lightweight hosted helpers.HealthHostedServiceA tiny hosted service that checks for the presence and accessibility of the configured governance policy file at startup and logs a warning or info. Helps catch misconfiguration early in CI/CD and on boot.
Automatically registered when you call
AddCerbiStream(...).Telemetry & metadata helpers
TelemetryContextsnapshot facility (static) andCerbiStreamLoggerAdapterwill merge telemetry context into log metadata when configured.Lightweight enrichment of
Activitytrace identifiers (TraceId,SpanId) whenEnableTracingEnrichmentis on.Relaxed logging wrapper
RelaxedLoggerWrapperandlogger.RelaxGovernance()helper allow callers to mark specific logs asGovernanceRelaxed(bypass validation/redaction) for intentional diagnostics or developer flows.Performance-friendly runtime changes
Temporary
Dictionary<string, object>pooling to reduce per-log allocations when convertingIDictionaryto a concrete dictionary.Pooled
HashSet<string>fortoRedactto avoid frequent allocations.Streaming parsing of JSON-formatted
GovernanceViolationsviaUtf8JsonReaderto preventJsonDocumentallocations on hot paths.Tests
Unit tests added for the health hosted service (
CerbiStream--UnitTests/HealthHostedServiceTests.cs) and existing test coverage continues for options, governance and telemetry providers.
Quick usage example (recommended):
var builder = Host.CreateDefaultBuilder(args);
var appBuilder = builder.ConfigureLogging((context, logging) =>
{
logging.AddCerbiStream(options =>
{
options.WithFileFallback("logs/fallback.json");
options.WithTelemetryEnrichment(true);
options.WithGovernanceChecks(true);
});
});
This wires CerbiStream into the standard host logging system and registers the health check hosted service automatically.
How to run the health test locally:
dotnet test CerbiStream--UnitTests/UnitTests.csproj -f net8.0
The problem (why this exists)
Modern apps emit high volumes of structured logs across many services and destinations. Common challenges:
- PII and secrets accidentally logged and stored in multiple systems.
- Inconsistent field names and schemas break analytics & ML pipelines.
- Compliance audits require consistent redaction and proof of enforcement.
- Storing unstandardized logs increases indexing and storage costs.
The solution (what CerbiStream does)
CerbiStream enforces governance before logs are written to any sink:
- Validates logs against a
cerbi_governance.jsonpolicy per profile. - Tags logs with governance metadata (violations, profile version).
- Redacts disallowed/forbidden fields in-place.
- Integrates seamlessly with existing sinks and logging libraries.
Quick start (5-minute setup)
- Add the package or project reference to
LoggingStandards/CerbiStream.csproj(or install the NuGet package). - Create a simple policy file
cerbi_governance.jsonin your application folder or setCERBI_GOVERNANCE_PATH.
Example policy snippet:
{
"Version": "1.0.0",
"LoggingProfiles": {
"default": {
"DisallowedFields": ["ssn"],
"FieldSeverities": { "creditCard": "Forbidden" }
}
}
}
- Wire CerbiStream into your logging pipeline (example in
Program.cs):
var inner = LoggerFactory.Create(b => b.AddConsole());
builder.Logging.AddCerbiGovernanceRuntime(inner, "default", configPath: "./cerbi_governance.json");
OR use the convenience helper:
builder.Logging.AddCerbiStream(options =>
{
options.WithFileFallback("logs/fallback.json");
});
- Run. Logs that include
ssnorcreditCardfields will be redacted as***REDACTED***and governance tags will be present.
For more: see docs/INSTALLATION.md and docs/README-PRODUCTION.md.
Key features (at a glance)
- Runtime governance enforcement (validate, tag, redact)
- Profile-based policies (
LoggingProfiles) and env override viaCERBI_GOVERNANCE_PATH - In-place, case-insensitive redaction for structured logs
- Relaxed mode (
GovernanceRelaxed) to bypass enforcement when intentional - Low-latency: typical governance overhead ≈0.65 µs per log in our benchmarks
- Memory-efficient: pooled dictionaries & hashsets, streaming JSON parsing
- Integrations with AppInsights, OpenTelemetry, Datadog, AWS CloudWatch, GCP Stackdriver
- Queue + storage sinks: Azure, AWS SQS/Kinesis/S3, Google Pub/Sub/Storage, RabbitMQ, Kafka
- File fallback with rotation and optional encryption (AES/Base64)
- Configurable retry policies (Polly) and telemetry enrichment
- Unit tests and benchmark suite included (
CerbiStream--UnitTests,BenchmarkSuite1)
Integrations and extensibility
- Works as a middleware/provider for
Microsoft.Extensions.LoggingviaAddCerbiGovernanceRuntime. - Plug-in model and adapters available for Serilog so you can keep existing sinks and structured logging code.
- Governance policy source is pluggable — default is file; you can implement cloud-backed sources.
- Telemetry contexts and attributes (
CerbiTopic) included for downstream routing and analytics.
Performance & benchmark notes
- Baseline (no governance): ~26–28 ns per call (in-memory no-op sink).
- Governance path (validation + redaction): ~0.64–0.71 µs per call (measured with BenchmarkDotNet on representative hardware).
- Measured managed allocations on the governance path: approx840 B per call (reduced by pooling and streaming parsing).
- Benchmarks are in
BenchmarkSuite1/GovernanceLoggingBench.cs. Run locally with:
dotnet run --project BenchmarkSuite1/BenchmarkSuite1.csproj -c Release -- --join
These numbers show CerbiStream keeps enforcement cheap while guaranteeing policy compliance across sinks.
Security & compliance
- Policies should be stored and changed via PRs and restricted permissions.
- Redaction is applied at the ingestion point to reduce exposure risk.
- Audit fields (
GovernanceViolations,GovernanceProfileVersion) make it easy to prove enforcement for audits. - Encryption support (AES) for file fallback and optional payload encryption for sensitive storage.
Packaging & CI
- NuGet packaging metadata is configured in
LoggingStandards/CerbiStream.csproj(symbols/snupkg generation enabled). - GitHub Actions workflow at
.github/workflows/build-and-test.ymlbuilds and runs tests on push/PR.
How CerbiStream fits the Cerbi product family
- Runtime enforcement is complemented by static analysis via
CerbiStream.GovernanceAnalyzerand dashboards such asCerbiShield. CerbIQand analytics products benefit from standardized, redacted, and tagged logs for ML/AI use.
Selling points (clear value props for stakeholders)
- Reduce risk: prevents accidental PII leakage and reduces remediation costs.
- Compliance-first: enforces policies at the earliest point, simplifying audits.
- Cost control: standardized logs reduce high-cardinality fields being stored/indexed in multiple systems.
- Developer-friendly: integrates with existing logging frameworks — no need to replace Serilog or MEL.
- ML/AI readiness: consistent schemas and enforced metadata make logs immediately usable for analytics and models.
- Fast and safe: sub-microsecond enforcement for typical cases with low allocation strategies.
FAQ (short)
Q: Does CerbiStream replace Serilog or MEL? A: No. CerbiStream is a governance/enrichment layer that plugs into MEL/Serilog. It ensures logs are compliant before they reach sinks.
Q: What if policy changes frequently? A: The adapter watches the policy file and reloads safely; for remote policy sources you can implement a custom source.
Q: What if I need zero-latency logging? A: For extreme use cases you can offload validation to a background pipeline (trade-off: immediate delivery semantics change). Contact us to help design that architecture.
Documentation & support
- Installation & quick start:
docs/INSTALLATION.md - Production guidance & checklist:
docs/README-PRODUCTION.md - Troubleshooting:
docs/TROUBLESHOOTING.md - Technical walkthrough:
docs/WALKTHROUGH-TECHNICAL.md - Non-technical overview:
docs/OVERVIEW-NONTECHNICAL.md
Contributing
Contributions are welcome. Please follow existing code style, add tests for behavior changes, and run the benchmark suite when changing hot paths.
If you want this content split into a dedicated docs/FEATURES.md or docs/WHY-CERBI.md, I can move it and add cross-links. What would you prefer?
| 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
- AWSSDK.CloudWatchLogs (>= 4.0.7.7)
- AWSSDK.Kinesis (>= 4.0.4.1)
- AWSSDK.S3 (>= 4.0.6.13)
- AWSSDK.SQS (>= 4.0.1.2)
- Azure.Core (>= 1.47.3)
- Azure.Messaging.ServiceBus (>= 7.20.1)
- Azure.Storage.Blobs (>= 12.25.0)
- Azure.Storage.Common (>= 12.24.0)
- Azure.Storage.Queues (>= 12.23.0)
- cerberus-logger-interface (>= 1.0.26)
- Cerbi.Governance.Core (>= 1.0.2)
- Cerbi.Governance.Runtime (>= 1.1.1)
- Datadog.Trace (>= 3.25.0)
- Google.Cloud.Logging.V2 (>= 4.4.0)
- Google.Cloud.PubSub.V1 (>= 3.27.0)
- Google.Cloud.Storage.V1 (>= 4.13.0)
- Google.Protobuf (>= 3.32.0)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.Extensions.Configuration (>= 9.0.8)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.8)
- OpenTelemetry (>= 1.12.0)
- OpenTelemetry.Exporter.Console (>= 1.12.0)
- Polly (>= 8.6.3)
- RabbitMQ.Client (>= 7.1.2)
- System.Configuration.ConfigurationManager (>= 9.0.8)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 9.0.8)
- System.Security.Cryptography.ProtectedData (>= 9.0.8)
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.1.78 | 78 | 11/25/2025 |
| 1.1.77 | 221 | 11/22/2025 |
| 1.1.76 | 214 | 11/22/2025 |
| 1.1.75 | 214 | 11/22/2025 |
| 1.1.74 | 155 | 11/15/2025 |
| 1.1.73 | 164 | 11/15/2025 |
| 1.1.72 | 173 | 10/30/2025 |
| 1.1.71 | 176 | 10/30/2025 |
| 1.1.70 | 180 | 10/27/2025 |
| 1.1.69 | 163 | 10/27/2025 |
| 1.1.67 | 109 | 10/24/2025 |
| 1.1.66 | 108 | 10/24/2025 |
| 1.1.65 | 114 | 10/24/2025 |
| 1.1.64 | 118 | 10/24/2025 |
| 1.1.63 | 120 | 10/24/2025 |
| 1.1.62 | 112 | 10/24/2025 |
| 1.1.61 | 125 | 10/24/2025 |
| 1.1.60 | 119 | 10/24/2025 |
| 1.1.59 | 127 | 10/24/2025 |
| 1.1.58 | 160 | 10/24/2025 |
| 1.1.57 | 181 | 9/9/2025 |
| 1.1.55 | 171 | 9/7/2025 |
| 1.1.54 | 148 | 9/7/2025 |
| 1.1.19 | 119 | 7/4/2025 |
| 1.1.18 | 192 | 5/20/2025 |
| 1.1.17 | 193 | 5/20/2025 |
| 1.1.16 | 199 | 5/20/2025 |
| 1.1.15 | 163 | 5/18/2025 |
| 1.1.14 | 272 | 5/15/2025 |
| 1.1.13 | 280 | 5/14/2025 |
| 1.1.12 | 281 | 5/14/2025 |
| 1.1.11 | 280 | 5/14/2025 |
| 1.1.10 | 271 | 5/14/2025 |
| 1.1.9 | 264 | 5/13/2025 |
| 1.1.8 | 300 | 5/13/2025 |
| 1.1.7 | 192 | 5/6/2025 |
| 1.1.6 | 236 | 4/27/2025 |
| 1.1.5 | 207 | 4/27/2025 |
| 1.1.3 | 191 | 4/27/2025 |
| 1.1.2 | 205 | 4/25/2025 |
| 1.1.1 | 252 | 4/13/2025 |
| 1.1.0 | 218 | 4/13/2025 |
| 1.0.16 | 181 | 4/10/2025 |
| 1.0.15 | 179 | 4/7/2025 |
| 1.0.14 | 135 | 4/6/2025 |
| 1.0.13 | 162 | 3/28/2025 |
| 1.0.12 | 144 | 3/27/2025 |
| 1.0.11 | 483 | 3/26/2025 |
| 1.0.10 | 502 | 3/25/2025 |
| 1.0.9 | 176 | 3/23/2025 |
| 1.0.8 | 93 | 3/22/2025 |
| 1.0.7 | 160 | 3/21/2025 |
| 1.0.6 | 170 | 3/20/2025 |
| 1.0.5 | 175 | 3/20/2025 |
| 1.0.4 | 158 | 3/19/2025 |
| 1.0.3 | 164 | 3/19/2025 |
| 1.0.2 | 180 | 3/12/2025 |
| 1.0.1 | 175 | 3/12/2025 |
See docs/RELEASE-NOTES.md