Table of Contents

Class NullTelemetrySanitizer

Namespace
Excalibur.Dispatch.Telemetry
Assembly
Excalibur.Dispatch.Abstractions.dll

A no-op implementation of ITelemetrySanitizer that passes all values through unchanged.

public sealed class NullTelemetrySanitizer : ITelemetrySanitizer
Inheritance
NullTelemetrySanitizer
Implements
Inherited Members
Extension Methods

Remarks

WARNING: This implementation provides NO PII protection. All tag values and payloads are passed through to telemetry backends without sanitization. This is the default when AddDispatchObservability() has not been called.

For production use, call AddDispatchObservability() which registers HashingTelemetrySanitizer (SHA-256 hashing of PII fields). Use this implementation only in development environments or when raw telemetry data is explicitly acceptable.

Fields

Instance

The shared singleton instance.

public static readonly NullTelemetrySanitizer Instance

Field Value

NullTelemetrySanitizer

Methods

SanitizePayload(string)

Sanitizes a payload string (e.g., a message body or log message) before it is emitted.

public string SanitizePayload(string payload)

Parameters

payload string

The raw payload to sanitize.

Returns

string

The sanitized payload.

SanitizeTag(string, string?)

Sanitizes a telemetry tag value before it is emitted.

public string? SanitizeTag(string tagName, string? rawValue)

Parameters

tagName string

The name of the tag (e.g., "user.id", "auth.email").

rawValue string

The raw tag value to sanitize.

Returns

string

The sanitized value, or null to suppress the tag entirely.