PulseSanitizer class abstract interface

Defines the contract for sanitizing PulseEvents before transport.

Sanitization is a mandatory, non-skippable step in the EventPipeline. It runs after all EventProcessors and before PulseTransport.send is called. Its purpose is to ensure that sensitive information is redacted before events leave the device.

Contract

  • Must not modify the original event. Events are immutable; return a new instance with sensitive data removed or replaced.
  • Must not throw. If sanitization fails, the pipeline drops the event rather than sending unsanitized data.
  • Must be deterministic. The same input event must always produce the same sanitized output.

Default implementation

DefaultSanitizer provides out-of-the-box redaction of 20+ sensitive key patterns (passwords, tokens, API keys, payment data, etc.).

Custom sanitizer

Replace DefaultSanitizer by providing your own implementation:

PulseConfig(
  dsn: '...',
  sanitizer: MyOrganizationSanitizer(),
)

To extend DefaultSanitizer, subclass it and call super.sanitize(event) before applying additional redaction.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sanitize(PulseEvent event) PulseEvent
Returns a sanitized copy of event.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited