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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pervaxis.Core.Observability" Version="1.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pervaxis.Core.Observability" Version="1.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Pervaxis.Core.Observability" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pervaxis.Core.Observability --version 1.6.0
                    
#r "nuget: Pervaxis.Core.Observability, 1.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Pervaxis.Core.Observability@1.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Pervaxis.Core.Observability&version=1.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Pervaxis.Core.Observability&version=1.6.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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