Jido.Signal.Sanitizer (Jido Signal v2.2.1)

View Source

Shared sanitization profiles for observability and transport boundaries.

Use :telemetry when values are heading to logs or telemetry metadata. Use :transport when values are crossing a public, serialized boundary.

Summary

Functions

Returns an inspect-safe, bounded preview string for logs.

Sanitizes a value for the requested boundary profile.

Types

profile()

@type profile() :: :telemetry | :transport

Functions

preview(value, profile \\ :telemetry, opts \\ [])

@spec preview(term(), profile(), keyword()) :: String.t()

Returns an inspect-safe, bounded preview string for logs.

sanitize(value, profile)

@spec sanitize(term(), profile()) :: term()

Sanitizes a value for the requested boundary profile.