CerbiStream 1.0.7
See the version list below for details.
dotnet add package CerbiStream --version 1.0.7
NuGet\Install-Package CerbiStream -Version 1.0.7
<PackageReference Include="CerbiStream" Version="1.0.7" />
<PackageVersion Include="CerbiStream" Version="1.0.7" />
<PackageReference Include="CerbiStream" />
paket add CerbiStream --version 1.0.7
#r "nuget: CerbiStream, 1.0.7"
#:package CerbiStream@1.0.7
#addin nuget:?package=CerbiStream&version=1.0.7
#tool nuget:?package=CerbiStream&version=1.0.7
CerbiStream Logging Library
CerbiStream is a next-generation logging solution built for structured logs, governance enforcement, and multi-destination routing. It ensures secure, consistent, and high-performance logging for cloud, on-prem, and hybrid environments.
π What's New?
- Telemetry Support β Seamless integration with AWS CloudWatch, GCP Cloud Trace, Azure Application Insights, and Datadog for distributed tracing.
- Configurable Telemetry Providers β Choose which telemetry provider to use or disable telemetry entirely.
- Optimized Telemetry β Exclude noisy events (
DebugLog
,HealthCheck
, etc.) and control sampling rates for cost optimization. - Multi-Cloud Telemetry β Route logs and traces to multiple cloud providers based on your architecture.
If you want Governance Enforcement, also install:
dotnet add package CerbiStream.GovernanceAnalyzer
π¦ Installation
Install CerbiStream from NuGet:
dotnet add package CerbiStream
π¦ Installation
Install CerbiStream from NuGet:
dotnet add package CerbiStream
If you want Governance Enforcement, also install:
dotnet add package CerbiStream.GovernanceAnalyzer
β‘ Quick Start (Minimal Setup) With CerbiStream, you can integrate logging in seconds.
using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using CerbiStream.Logging.Extensions;
```csharp
class Program
{
static void Main()
{
var serviceProvider = new ServiceCollection()
.AddLogging(builder =>
{
builder.AddConsole();
builder.AddCerbiStream(options =>
{
options.SetQueue("RabbitMQ", "localhost", "logs-queue");
options.EnableDevMode();
options.EnableGovernance();
});
})
.BuildServiceProvider();
var logger = serviceProvider.GetRequiredService<ILogger<Program>>();
logger.LogInformation("Application started successfully!");
logger.LogError("This is a test error log.");
logger.LogWarning("Potential issue detected.");
logger.LogCritical("Critical failure occurred!");
}
}
π οΈ Advanced Configuration
If you need more control, you can configure CerbiStream dynamically.
var config = new CerbiStreamOptions();
config.SetQueue("Kafka", "kafka://broker-url", "app-logs");
config.DisableDevMode();
config.EnableGovernance();
config.IncludeAdvancedMetadata();
var logger = new CerbiStreamLogger(config);
π Supported Logging Destinations
Queue Type | Example Usage |
---|---|
RabbitMQ | QueueType = "RabbitMQ" |
Kafka | QueueType = "Kafka" |
Azure Queue Storage | QueueType = "AzureQueue" |
Azure Service Bus | QueueType = "AzureServiceBus" |
AWS SQS | QueueType = "AWS_SQS" |
AWS Kinesis | QueueType = "AWS_Kinesis" |
Google Pub/Sub | QueueType = "GooglePubSub" |
π Automatic Metadata (No Setup Required)
Metadata Field | Auto-Detected? | Example Value |
---|---|---|
CloudProvider | β Yes | AWS, Azure, GCP, On-Prem |
Region | β Yes | us-east-1, eu-west-2 |
Environment | β Yes | Development, Production |
ApplicationVersion | β Yes | v1.2.3 |
RequestId | β Yes (Generated) | abc123 |
TransactionType | β Developer Sets | REST, gRPC, Kafka |
TransactionStatus | β Developer Sets | Success, Failed |
π Governance & Structured Logging
Governance allows organizations to enforce structured logging signatures by:
- β
Defining required fields (e.g., every log must include
UserId
,RequestId
, etc.). - β Allowing optional fields that developers can extend dynamically.
- β
Using a governance configuration file (
cerbi_governance.json
) for dynamic updates. Example Governance JSON:
{
"LoggingProfiles": {
"TransactionLog": {
"RequiredFields": ["TransactionId", "UserId", "Amount"],
"OptionalFields": ["DiscountCode"]
},
"SecurityLog": {
"RequiredFields": ["UserId", "IPAddress"],
"OptionalFields": ["DeviceType"]
}
}
}
If GovernanceEnabled = true, logs must match the configured structure.
β Governance Analyzer (Build-Time Validation)
CerbiStream GovernanceAnalyzer uses Roslyn to validate log compliance at build time. This ensures structured logs without runtime overhead.
π Debug Mode (Local Development) CerbiStream prevents queue logging while debugging. This is enabled by default (EnableDevMode = true).
var config = new CerbiStreamOptions();
config.EnableDevMode();
var logger = new CerbiStreamLogger(config);
await logger.LogEventAsync("Debugging locally", LogLevel.Debug);
π Meta Data Sharing (Opt-In)
CerbiStream collects aggregate trends across applications for AI-powered insights. β No Personally Identifiable Information (PII) is stored.
If enabled, your logs contribute to global analytics (Error Trends, Cloud Performance, API Response Issues). If disabled, your logs remain 100% private.
var config = new CerbiStreamOptions();
config.IncludeAdvancedMetadata();
config.IncludeSecurityMetadata();
π Telemetry Support (Optional)
CerbiStream now supports distributed tracing and application performance monitoring through multiple telemetry providers.
Supported Telemetry Providers
Provider | Status |
---|---|
Azure Application Insights | β Supported |
AWS CloudWatch | β Supported |
Google Cloud Trace | β Supported |
Datadog | β Supported |
OpenTelemetry (default) | β Supported |
π Configuring Telemetry in CerbiStream
To enable telemetry, specify a provider in the CerbiStreamOptions
configuration:
var config = new CerbiStreamOptions();
config.SetTelemetryProvider(new AppInsightsTelemetryProvider()); // Choose from AppInsights, AWS, GCP, Datadog, etc.
config.SetQueue("RabbitMQ", "localhost", "logs-queue");
config.EnableGovernance();
var logger = new CerbiStreamLogger(config);
π Multi-Cloud Telemetry Routing
You can route different types of logs to different telemetry providers for better visibility.
Log Type | Default Destination |
---|---|
Application Logs | Google Cloud Trace |
Infrastructure Logs | AWS CloudWatch |
Security & Audit Logs | Azure Application Insights |
Performance Metrics | Datadog |
To customize this, configure the routing rules in your governance JSON file:
{
"TelemetryRouting": {
"ApplicationLogs": "GoogleCloud",
"InfraLogs": "AWS",
"SecurityLogs": "Azure",
"PerformanceMetrics": "Datadog"
}
}
β‘ Optimized Telemetry Collection
CerbiStream minimizes unnecessary logging noise while ensuring critical events are captured.
- β Event Sampling β Configurable rate limiting to balance cost & observability.
- β
Noise Reduction β Filters out low-priority logs like
HealthCheck
&DebugLog
. - β Auto-Enabled for Supported Providers β Telemetry is automatically enabled when a supported provider is detected (AWS, GCP, Azure).
π Auto-Enabled Telemetry Providers
CerbiStream detects and configures telemetry based on your cloud environment.
Cloud Provider | Auto-Enabled Telemetry Service |
---|---|
AWS | CloudWatch |
Azure | Application Insights |
Google Cloud | Stackdriver Trace |
On-Prem | OpenTelemetry (Custom Configuration) |
Developers can override these settings to manually specify their preferred telemetry provider.
π Multi-Telemetry Provider Setup
CerbiStream allows you to integrate multiple telemetry providers for better observability across cloud environments.
π Example: Using OptimizedTelemetryProvider, AWS CloudWatch & Azure Application Insights
using CerbiStream.Configuration;
using CerbiStream.Interfaces;
using CerbiStream.Classes.OpenTelemetry;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
class Program
{
static void Main()
{
var serviceProvider = new ServiceCollection()
.AddLogging(builder =>
{
builder.AddConsole();
builder.AddCerbiStream(options =>
{
options.SetQueue("RabbitMQ", "localhost", "logs-queue");
options.EnableDevMode();
options.EnableGovernance();
// β
Optimized telemetry provider (efficient tracing with sampling)
options.AddTelemetryProvider(new OptimizedTelemetryProvider(samplingRate: 0.5));
// β
Add multiple telemetry providers
options.AddTelemetryProvider(new CloudWatchTelemetryProvider());
options.AddTelemetryProvider(new AppInsightsTelemetryProvider());
});
})
.BuildServiceProvider();
var logger = serviceProvider.GetRequiredService<ILogger<Program>>();
logger.LogInformation("Application started successfully!");
logger.LogError("Critical error detected in system.");
}
}
You can enable, disable, or prioritize telemetry providers as needed.
options.EnableTelemetry(); // Enable all auto-detected telemetry providers
options.DisableTelemetry(); // Disable all telemetry tracking
options.SetTelemetrySamplingRate(0.3); // 30% sampling for cost optimization
Example: Using OptimizedTelemetryProvider
options.AddTelemetryProvider(new OptimizedTelemetryProvider(samplingRate: 0.5));
π Rollup & Multi-Project Visibility
CerbiStream supports centralized telemetry aggregation, allowing you to visualize logs, metrics, and traces from multiple services or microservices in one place.
This is especially useful for:
- π Microservices Architectures
- π§© Distributed Systems
- π οΈ Multi-Environment Monitoring (Dev / QA / Prod)
π§ Example: Using Application Insights for Rollups
With Azure Application Insights, all telemetry (from different apps) can be grouped under a single Application Map:
options.AddTelemetryProvider(new AppInsightsTelemetryProvider());
Be sure to:
Use the same Instrumentation Key or Connection String across services. Tag logs with AppName, Environment, or Component for grouping:
var metadata = new Dictionary<string, string>
{
{ "AppName", "CheckoutService" },
{ "Environment", "Production" },
{ "Component", "PaymentProcessor" }
};
logger.LogEvent("Payment failed", LogLevel.Error, metadata);
π₯ Why Use CerbiStream?
- β No External Dependencies β Just install & start logging.
- π Optimized Performance β Logs lightweight metadata automatically.
- π Security First β Encrypts fields and ensures NPI-free logging.
- π Global Insights β Identify patterns across industries (if opted-in).
- β‘ Minimal Setup β Works out-of-the-box with simple constructor injection.
π License CerbiStream is open-source and available under the MIT License.
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 (>= 3.7.410.5)
- AWSSDK.Kinesis (>= 3.7.402.86)
- AWSSDK.SQS (>= 3.7.400.109)
- Azure.Core (>= 1.45.0)
- Azure.Messaging.ServiceBus (>= 7.18.4)
- Azure.Storage.Common (>= 12.23.0-beta.1)
- Azure.Storage.Queues (>= 12.22.0-beta.1)
- cerberus-logger-interface (>= 1.0.26)
- CerbiStream.GovernanceAnalyzer (>= 1.0.1)
- Datadog.Trace (>= 3.12.0)
- Google.Cloud.Logging.V2 (>= 4.4.0)
- Google.Cloud.PubSub.V1 (>= 3.21.0)
- Google.Protobuf (>= 3.30.0)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.Extensions.Configuration (>= 9.0.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0-preview.1.25080.5)
- Moq (>= 4.20.72)
- NUnit (>= 4.3.2)
- OpenTelemetry (>= 1.11.2)
- OpenTelemetry.Exporter.Console (>= 1.11.2)
- RabbitMQ.Client (>= 6.4.0)
- System.Configuration.ConfigurationManager (>= 10.0.0-preview.1.25080.5)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 10.0.0-preview.1.25080.5)
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.57 | 170 | 9/9/2025 |
1.1.55 | 164 | 9/7/2025 |
1.1.54 | 135 | 9/7/2025 |
1.1.19 | 103 | 7/4/2025 |
1.1.18 | 179 | 5/20/2025 |
1.1.17 | 181 | 5/20/2025 |
1.1.16 | 188 | 5/20/2025 |
1.1.15 | 154 | 5/18/2025 |
1.1.14 | 260 | 5/15/2025 |
1.1.13 | 263 | 5/14/2025 |
1.1.12 | 271 | 5/14/2025 |
1.1.11 | 266 | 5/14/2025 |
1.1.10 | 257 | 5/14/2025 |
1.1.9 | 257 | 5/13/2025 |
1.1.8 | 285 | 5/13/2025 |
1.1.7 | 178 | 5/6/2025 |
1.1.6 | 218 | 4/27/2025 |
1.1.5 | 194 | 4/27/2025 |
1.1.3 | 173 | 4/27/2025 |
1.1.2 | 193 | 4/25/2025 |
1.1.1 | 233 | 4/13/2025 |
1.1.0 | 209 | 4/13/2025 |
1.0.16 | 168 | 4/10/2025 |
1.0.15 | 166 | 4/7/2025 |
1.0.14 | 121 | 4/6/2025 |
1.0.13 | 149 | 3/28/2025 |
1.0.12 | 134 | 3/27/2025 |
1.0.11 | 474 | 3/26/2025 |
1.0.10 | 493 | 3/25/2025 |
1.0.9 | 162 | 3/23/2025 |
1.0.8 | 83 | 3/22/2025 |
1.0.7 | 140 | 3/21/2025 |
1.0.6 | 153 | 3/20/2025 |
1.0.5 | 159 | 3/20/2025 |
1.0.4 | 149 | 3/19/2025 |
1.0.3 | 153 | 3/19/2025 |
1.0.2 | 165 | 3/12/2025 |
1.0.1 | 159 | 3/12/2025 |