Class NullTelemetrySanitizer
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
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
payloadstringThe 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
tagNamestringThe name of the tag (e.g., "user.id", "auth.email").
rawValuestringThe raw tag value to sanitize.