Pervaxis.Core.Observability
1.6.0
dotnet add package Pervaxis.Core.Observability --version 1.6.0
NuGet\Install-Package Pervaxis.Core.Observability -Version 1.6.0
<PackageReference Include="Pervaxis.Core.Observability" Version="1.6.0" />
<PackageVersion Include="Pervaxis.Core.Observability" Version="1.6.0" />
<PackageReference Include="Pervaxis.Core.Observability" />
paket add Pervaxis.Core.Observability --version 1.6.0
#r "nuget: Pervaxis.Core.Observability, 1.6.0"
#:package Pervaxis.Core.Observability@1.6.0
#addin nuget:?package=Pervaxis.Core.Observability&version=1.6.0
#tool nuget:?package=Pervaxis.Core.Observability&version=1.6.0
Pervaxis.Core.Observability
Structured logging (Serilog), distributed tracing (OpenTelemetry / AWS X-Ray), and per-request context propagation. Implements Sections 16 and 21 of the Pervaxis Platform Spec.
Installation
dotnet add package Pervaxis.Core.Observability
Registration
// In Program.cs
builder.Host.UsePervaxisLogging(sinks =>
{
// Add CloudWatch or any other Serilog sink here
// sinks.WriteTo.AmazonCloudWatch(...);
});
builder.Services.AddPervaxisObservability();
Configuration via appsettings.json:
{
"Pervaxis": {
"Observability": {
"ServiceName": "order-service",
"Environment": "production",
"ServiceVersion": "1.2.0",
"Logging": {
"MinimumLevel": "Information"
},
"Tracing": {
"OtlpEndpoint": "http://localhost:4317",
"SamplingRatio": 1.0
}
}
}
}
Per-Request Context
Set correlation, tenant, and user context at the request boundary (e.g. middleware):
public class PervaxisContextMiddleware(
IObservabilityContextAccessor contextAccessor,
RequestDelegate next)
{
public async Task InvokeAsync(HttpContext httpContext)
{
contextAccessor.Properties = new ObservabilityProperties
{
CorrelationId = httpContext.Request.Headers["X-Correlation-ID"].FirstOrDefault()
?? Guid.NewGuid().ToString(),
TenantId = httpContext.Request.Headers["X-Tenant-ID"].FirstOrDefault()
};
await next(httpContext);
}
}
Required Log Fields (Section 21)
Every log event is automatically stamped with:
| Field | Source |
|---|---|
timestamp |
Serilog UTC |
level |
Serilog level |
serviceName |
ObservabilityOptions.ServiceName |
environment |
ObservabilityOptions.Environment |
traceId |
Activity.Current.TraceId |
spanId |
Activity.Current.SpanId |
correlationId |
IObservabilityContextAccessor.Properties.CorrelationId |
tenantId |
IObservabilityContextAccessor.Properties.TenantId |
userId |
IObservabilityContextAccessor.Properties.UserId (omitted if null) |
exceptionId |
IObservabilityContextAccessor.Properties.ExceptionId (omitted if null) |
Sensitive Data Redaction
The RedactionDestructuringPolicy automatically redacts 22 sensitive property names:
password, token, secret, apiKey, ssn, cvv, authorization, and others.
Any object whose type name contains Credential, Secret, Token, or Password is fully redacted.
Distributed Tracing
using var activity = PervaxisActivitySource.StartActivity("ProcessOrder");
activity?.SetTag("orderId", orderId);
activity?.SetTag("tenantId", tenantId.Value);
Traces export via OTLP to AWS ADOT Collector → AWS X-Ray.
Pervaxis Platform · Clarivex Technologies · https://clarivex.tech
| 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- OpenTelemetry (>= 1.15.3)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- OpenTelemetry.Instrumentation.Runtime (>= 1.9.0)
- Pervaxis.Core.Abstractions (>= 1.6.0)
- Serilog (>= 4.0.2)
- Serilog.Extensions.Hosting (>= 8.0.0)
- Serilog.Extensions.Logging (>= 8.0.0)
- Serilog.Sinks.Console (>= 6.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Pervaxis.Core.Observability:
| Package | Downloads |
|---|---|
|
Pervaxis.Genesis.Base
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.0 | 0 | 6/6/2026 |