CerbiStream 1.1.18
dotnet add package CerbiStream --version 1.1.18
NuGet\Install-Package CerbiStream -Version 1.1.18
<PackageReference Include="CerbiStream" Version="1.1.18" />
<PackageVersion Include="CerbiStream" Version="1.1.18" />
<PackageReference Include="CerbiStream" />
paket add CerbiStream --version 1.1.18
#r "nuget: CerbiStream, 1.1.18"
#addin nuget:?package=CerbiStream&version=1.1.18
#tool nuget:?package=CerbiStream&version=1.1.18
CerbiStream: Dev-Friendly, Governance-Enforced Logging for .NET
Brought to you by Cerbi LLC, your trusted partner in enterprise observability.
π View CerbiStream Benchmarks Compare against Serilog, NLog, and others. CerbiStream is engineered for high performance, strict governance, and enterprise-grade log routing.
π Supported Destinations
CerbiStream can route logs to:
- Queues: Azure Service Bus, RabbitMQ, Kafka, AWS SQS/Kinesis, Google Pub/Sub
- HTTP Endpoints: Any REST API with custom headers
- Cloud Storage: Azure Blob, AWS S3, Google Cloud Storage
- File Fallback: Local JSON file (AES/Base64 encryption supported)
- Telemetry Providers: App Insights, OpenTelemetry, Datadog, AWS CloudWatch, GCP Stackdriver
π§± CerbiSuite Overview
Component | Purpose |
---|---|
CerbiStream | Structured logging for .NET with queue & cloud targets |
Cerbi.Governance.Runtime | Runtime enforcement of governance rules |
CerbiStream.GovernanceAnalyzer | Compile-time governance analyzer |
CerbiShield (coming soon) | Governance dashboard & deployment portal |
CerbIQ (coming soon) | Metadata aggregation + routing pipeline |
CerbiSense (coming soon) | Governance scoring & ML analysis engine |
π Table of Contents
- Overview
- Highlights
- Developer Quick Start
- Advanced Setup & Best Practices
- Configuration Options
- Features
- Governance and Compliance
- Advanced Metadata & Encryption
- Usage Examples
- Integration & Supported Platforms
- Telemetry Provider Support
- Benchmark vs Serilog
- Unit Testing
- Contributing
- Community & Support
- License
π 2025 Governance Update
CerbiStream now uses real-time governance enforcement via Cerbi.Governance.Runtime, removing most limitations of build-time validation.
β Runtime Advantages:
- Compatible with .NET 6β8+
- Config from local, blob, or GitHub
- Automatically tags logs with governance info
- Supports
.Relax()
and[CerbiTopic]
β οΈ Build-Time Analyzer Limitations:
- Requires local files and static references
- Not compatible with CI or dynamic config
π Recent Updates (v1.1.2)
- Unified enrichment with
LogId
,ApplicationId
, etc. - Full-payload encryption using AES or Base64
- File fallback + cloud destinations (HTTP/Blob)
- Built-in governance validation
- Topic tagging and relaxed logging support
Developer Quick Start
π Quick Start Guide
π§° Developer Setup Matrix
Scenario | Method(s) Used | Description |
---|---|---|
πΉ Basic Dev (No Governance) | EnableDevModeMinimal() |
Minimal config, console only |
πΈ Dev + Governance | EnableDeveloperModeWithoutTelemetry() + .WithGovernanceChecks(true) |
Runtime enforcement, no telemetry |
π’ Dev + Governance + Telemetry | EnableDeveloperModeWithTelemetry() + .WithGovernanceChecks(true) + .WithTelemetryProvider(...) |
Full stack logging with runtime governance and telemetry |
π§ͺ Benchmarking | EnableBenchmarkMode() |
Disables all enrichments for performance tests |
π οΈ Production | EnableProductionMode() + .WithQueue(...) + .WithEncryptionMode(...) |
Production-ready config with security and routing |
πΉ Basic Development (No Governance)
builder.Logging.AddCerbiStream(options =>
{
options.EnableDevModeMinimal();
});
πΈ Development with Real-Time Governance
builder.Logging.AddCerbiStream(options =>
{
options.WithFileFallback("cerbi_fallback.json")
.WithGovernanceChecks(true)
.WithGovernanceProfile("default")
.EnableDeveloperModeWithoutTelemetry();
});
π’ Development with Governance + Telemetry
builder.Logging.AddCerbiStream(options =>
{
options.WithQueue("AzureServiceBus", "Endpoint=sb://...", "log-queue")
.WithEncryptionMode(EncryptionType.Base64)
.WithGovernanceChecks(true)
.WithTelemetryProvider(
TelemetryProviderFactory.CreateTelemetryProvider("appinsights")
)
.EnableDeveloperModeWithTelemetry();
});
---
## Advanced Setup & Best Practices
π [Advanced Setup Guide](LoggingStandards/README-CerbiStreamβAdvancedSetup&BestPractices.md)
---
## Overview
CerbiStream is a developer-first logging library built for performance, security, and governance enforcement.
---
## Highlights
- Async, queue-first architecture
- Flexible encryption
- Runtime governance validation
- Low object allocation
- Azure/GCP/AWS-aware metadata
---
## βοΈ Configuration Options
- `.WithQueue(...)`
- `.WithEncryptionMode(...)`
- `.WithFileFallback(...)`
- `.WithGovernanceChecks(...)`
- `.EnableDeveloperModeWithTelemetry()`
### Encryption Types
- `None`
- `Base64`
- `AES`
### Config Sources
- Local JSON
- Azure Blob / AWS S3 / GCP
- GitHub raw URL
---
## Features
- Topic-based log scoping
- Metadata injection
- Governance policy validation
- Relaxed log support
- Queue & blob transport
- Polly retry support
---
## Governance and Compliance
- Runtime enforcement with `Cerbi.Governance.Runtime`
- Analyzer available for CI validation
- Tags include `GovernanceProfileUsed`, `GovernanceViolations`, etc.
---
## Advanced Metadata & Encryption
```csharp
options.WithMetadataInjection(true)
.WithEncryptionMode(EncryptionType.AES)
.WithEncryptionKey(key, iv);
JSON logs are fully encrypted before sending.
Usage Examples
- Relaxed logging:
logger.Relax()
- Topic assignment:
[CerbiTopic("Payments")]
- Fallback to file:
.WithFileFallback("fallback.json")
- Multi-cloud: auto-populates cloud provider
π Relaxed Logging Modes
Cerbi supports two forms of relaxed logging to bypass governance rules when explicitly intended:
Mode Description Usage Example Fluent .Relax() Developer-triggered, scoped for individual log statements logger.Relax().LogInformation("...") Runtime .RelaxGovernance() Global override, wraps logger during startup configuration logger = logger.RelaxGovernance();
π§βπ» Developer Inline (Fluent API):
var logger = builder.Logging.CreateLogger("MyApp");
logger = logger.RelaxGovernance(); // All logs now include GovernanceRelaxed: true
This uses CerbiLoggerWrapper for structured logging, useful during development or for logs intentionally excluded from governance enforcement.
βοΈ Runtime Setup Override:
var logger = builder.Logging.CreateLogger("MyApp");
logger = logger.RelaxGovernance(); // All logs now include GovernanceRelaxed: true
Integration & Supported Platforms
- Queues: RabbitMQ, Azure, Kafka, etc.
- HTTP REST APIs
- Azure Blob, AWS S3, GCP Storage
- Auto-detect metadata from cloud env vars
Telemetry Provider Support
Provider | Activation Code |
---|---|
App Insights | CreateTelemetryProvider("appinsights") |
OpenTelemetry | ...("opentelemetry") |
AWS CloudWatch | ...("awscloudwatch") |
Datadog | ...("datadog") |
GCP Stackdriver | ...("gcpstackdriver") |
Benchmark vs Serilog
Metric | CerbiStream | Serilog |
---|---|---|
Log Throughput | >50K logs/sec | 10β30K logs/sec |
Encryption | Native, full JSON | External libs required |
Memory per log | ~1β3 KB | ~10β30 KB |
Governance | Built-in | Requires plugin stack |
Unit Testing
Covers:
- Governance rule enforcement
- Retry/backoff
- Metadata injection
- Fallback logging rotation
- Encryption and validation
Contributing
PRs welcome! Please open an issue first for large features. Follow code style and ensure tests pass.
Community & Support
- GitHub: https://github.com/Zeroshi/Cerbi-CerbiStream
- Email: hello@cerbi.io
- Website: https://cerbi.io
- Benchmarks: https://cerbi.systems
π Under the Hood: Runtime Defaults & Utilities
ββββββββββ
β log β
βββββ¬βββββ
β
βΌ
ββββββββββββ
β enrich ββββββ
ββββββ¬ββββββ β
βΌ β
ββββββββββββ β
β encrypt β β
ββββββ¬ββββββ β
βΌ β
ββββββββββββ β
β validate β β
ββββββ¬ββββββ β
βΌ β
ββββββββββββ β
β send βββββββ
ββββββββββββ
β²
β
ββββββββββββββββ
β RetryPolicy β
ββββββββββββββββ
CerbiStream includes helpful built-in utilities and conventions:
βοΈ Cloud Metadata Detection
Pulled from environment variables using ApplicationMetadata
:
CloudProvider
resolves from AWS, Azure, or GCP.Region
is inferred from cloud-specific variables.InstanceId
andApplicationVersion
are auto-filled.
π οΈ Central Config Convenience
Use CerbiStreamConfig
for:
- Single-file config initialization
- Auto-detected cloud + env context
- Runtime feature toggles (e.g., encryption, telemetry)
π Retry Behavior
Retry logic for queue delivery is powered by Polly:
RetryPolicyFactory.Create(3, 200); // Retries 3x with 200ms delay
This is used when .WithQueueRetries(...)
is enabled.
π‘ Telemetry Integration
Quickly wire up telemetry providers with:
TelemetryProviderFactory.CreateTelemetryProvider("appinsights");
Supported options include AppInsights, OpenTelemetry, Datadog, AWS CloudWatch, and GCP Stackdriver.
License
MIT Β© Cerbi LLC
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.1)
- AWSSDK.Kinesis (>= 4.0.2)
- AWSSDK.S3 (>= 4.0.0.1)
- AWSSDK.SQS (>= 4.0.0.1)
- Azure.Core (>= 1.45.0)
- Azure.Messaging.ServiceBus (>= 7.19.0)
- Azure.Storage.Blobs (>= 12.24.0)
- Azure.Storage.Common (>= 12.23.0)
- Azure.Storage.Queues (>= 12.22.0)
- cerberus-logger-interface (>= 1.0.26)
- Cerbi.Governance.Core (>= 1.0.2)
- Cerbi.Governance.Runtime (>= 1.1.1)
- Datadog.Trace (>= 3.15.0)
- Google.Cloud.Logging.V2 (>= 4.4.0)
- Google.Cloud.PubSub.V1 (>= 3.24.0)
- Google.Cloud.Storage.V1 (>= 4.13.0)
- Google.Protobuf (>= 3.30.2)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.Extensions.Configuration (>= 9.0.4)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.4)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.4)
- Moq (>= 4.20.72)
- NUnit (>= 4.3.2)
- OpenTelemetry (>= 1.12.0)
- OpenTelemetry.Exporter.Console (>= 1.12.0)
- Polly (>= 8.5.2)
- RabbitMQ.Client (>= 7.1.2)
- System.Configuration.ConfigurationManager (>= 9.0.4)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 9.0.4)
- System.Security.Cryptography.ProtectedData (>= 9.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.1.18 | 137 | 5/20/2025 |
1.1.17 | 136 | 5/20/2025 |
1.1.16 | 138 | 5/20/2025 |
1.1.15 | 97 | 5/18/2025 |
1.1.14 | 219 | 5/15/2025 |
1.1.13 | 216 | 5/14/2025 |
1.1.12 | 225 | 5/14/2025 |
1.1.11 | 218 | 5/14/2025 |
1.1.10 | 220 | 5/14/2025 |
1.1.9 | 224 | 5/13/2025 |
1.1.8 | 234 | 5/13/2025 |
1.1.7 | 136 | 5/6/2025 |
1.1.6 | 158 | 4/27/2025 |
1.1.5 | 150 | 4/27/2025 |
1.1.3 | 126 | 4/27/2025 |
1.1.2 | 142 | 4/25/2025 |
1.1.1 | 181 | 4/13/2025 |
1.1.0 | 177 | 4/13/2025 |
1.0.16 | 140 | 4/10/2025 |
1.0.15 | 140 | 4/7/2025 |
1.0.14 | 93 | 4/6/2025 |
1.0.13 | 116 | 3/28/2025 |
1.0.12 | 108 | 3/27/2025 |
1.0.11 | 445 | 3/26/2025 |
1.0.10 | 466 | 3/25/2025 |
1.0.9 | 135 | 3/23/2025 |
1.0.8 | 51 | 3/22/2025 |
1.0.7 | 114 | 3/21/2025 |
1.0.6 | 125 | 3/20/2025 |
1.0.5 | 129 | 3/20/2025 |
1.0.4 | 121 | 3/19/2025 |
1.0.3 | 123 | 3/19/2025 |
1.0.2 | 141 | 3/12/2025 |
1.0.1 | 131 | 3/12/2025 |