Fluens.Observability
0.9.4
dotnet add package Fluens.Observability --version 0.9.4
NuGet\Install-Package Fluens.Observability -Version 0.9.4
<PackageReference Include="Fluens.Observability" Version="0.9.4" />
<PackageVersion Include="Fluens.Observability" Version="0.9.4" />
<PackageReference Include="Fluens.Observability" />
paket add Fluens.Observability --version 0.9.4
#r "nuget: Fluens.Observability, 0.9.4"
#:package Fluens.Observability@0.9.4
#addin nuget:?package=Fluens.Observability&version=0.9.4
#tool nuget:?package=Fluens.Observability&version=0.9.4
Fluens.Observability
OpenTelemetry tracing, metrics, logging, and Serilog structured logging integration with optional Seq sink.
Installation
dotnet add package Fluens.Observability
Usage
fluensBuilder
.AddObservability(opts =>
{
opts.OtlpEndpoint = "http://localhost:4317";
opts.SamplingRatio = 1.0;
})
.AddSerilog();
ObservabilityOptions properties: Enabled, EnableTracing, EnableMetrics, EnableLogging, OtlpEndpoint, SamplingRatio, AdditionalSources, AdditionalMeters, SeqEndpoint, SeqApiKey.
Configuration section: Fluens:Observability.
Both AddObservability and AddSerilog accept optional configuration callbacks for inline customization.
A callback-only AddObservability(o => ...) call — with no matching Fluens:Observability configuration
section present — is still honoured and validated: the callback's values reach the composed
ObservabilityOptions instance.
AddSerilog() and AddObservability() can be called in either order: AddSerilog() reads
ObservabilityOptions (for the optional Seq sink) lazily, when the logger is actually built rather
than when AddSerilog() itself is called, so the Seq sink is activated correctly whether
AddObservability(o => o.SeqEndpoint = "...") runs before or after AddSerilog().
AddSerilog() also works without AddObservability(). When AddObservability() has not bound the options,
the logger build reads the Fluens:Observability section directly from configuration (not cached, not
validated, not registered in DI), so Fluens:Observability:SeqEndpoint alone activates the Seq sink.
The Seq sink is added only when Enabled is true (the default) and SeqEndpoint is not blank. Enabled = false,
from the section or from the AddObservability callback, adds no Seq sink. With no section and no
AddObservability() there is no Seq sink.
When Enabled is true, AddObservability() also registers the composed ObservabilityOptions as a
marker singleton in DI. Fluens.Web.Observability's UseRequestLogging() and UsePrometheusEndpoint()
probe that singleton to tell "enabled" from "disabled via callback/config" or "AddObservability() never
called" - so a host that calls them unconditionally always starts cleanly.
LogSanitizer
Static helpers for redacting PII from log messages. Uses [GeneratedRegex] for AOT-compatible pattern matching.
LogSanitizer.Redact(value); // Replaces entire value with ***REDACTED***
LogSanitizer.MaskEmail(value); // Preserves first two chars of local part and full domain
LogSanitizer.MaskCardNumber(value); // Preserves last four digits
LogSanitizer.MaskPhone(value); // Preserves last four digits
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Fluens (>= 0.9.4)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.13)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.20.1)
- OpenTelemetry.Extensions.Hosting (>= 1.20.1)
- OpenTelemetry.Instrumentation.Http (>= 1.20.1)
- OpenTelemetry.Instrumentation.Runtime (>= 1.20.1)
- Scrutor (>= 7.0.0)
- Serilog (>= 4.4.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Extensions.Hosting (>= 10.0.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Settings.Configuration (>= 10.0.1)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.Seq (>= 9.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fluens.Observability:
| Package | Downloads |
|---|---|
|
Fluens.Web.Observability
ASP.NET Core observability features: Prometheus metrics endpoint and request logging middleware. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.4 | 211 | 11/30/2026 |
| 0.9.3 | 359 | 11/17/2026 |
| 0.9.2 | 182 | 10/21/2026 |
| 0.9.1 | 488 | 10/13/2026 |
| 0.9.0 | 116 | 10/13/2026 |
| 0.8.7 | 260 | 10/12/2026 |
| 0.8.6 | 114 | 10/12/2026 |
| 0.8.5 | 142 | 10/7/2026 |
| 0.8.4 | 108 | 10/6/2026 |
| 0.8.3 | 107 | 10/6/2026 |
| 0.8.2 | 181 | 10/5/2026 |
| 0.8.1 | 185 | 9/15/2026 |
| 0.8.0 | 125 | 9/15/2026 |
| 0.7.11 | 126 | 9/15/2026 |
| 0.7.10 | 133 | 9/13/2026 |
| 0.7.9 | 128 | 9/11/2026 |
| 0.7.8 | 137 | 9/10/2026 |
| 0.7.7 | 141 | 9/10/2026 |
| 0.7.6 | 187 | 7/1/2026 |
| 0.7.5 | 156 | 6/22/2026 |