Table of Contents

Interface ITelemetrySanitizer

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

Sanitizes telemetry data to prevent PII leakage into observability systems.

public interface ITelemetrySanitizer
Extension Methods

Remarks

Implementations control how sensitive data (user IDs, email addresses, tokens) is handled before being emitted as span tags, log properties, or metric dimensions.

The default implementation (HashingTelemetrySanitizer) uses SHA-256 hashing for sensitive values, suppresses highly sensitive tags entirely, and passes through non-sensitive data unchanged.

Methods

SanitizePayload(string)

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

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.

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.