Jidoka.Trace.Policy (Jidoka v0.8.0-beta.1)

Copy Markdown View Source

Trace projection policy.

Policies are data. They decide whether trace entries are emitted, how much to sample, and which keys should be omitted or redacted before a trace sink sees the event data.

Summary

Types

t()

@type t() :: %Jidoka.Trace.Policy{
  enabled: boolean(),
  metadata: map(),
  omit_keys: [binary()],
  redact_keys: [binary()],
  sample_rate: number()
}

Functions

default_omit_keys()

@spec default_omit_keys() :: [String.t()]

default_redact_keys()

@spec default_redact_keys() :: [String.t()]

from_input(policy)

@spec from_input(t() | keyword() | map() | nil) :: {:ok, t()} | {:error, term()}

new(attrs \\ [])

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

new!(attrs \\ [])

@spec new!(keyword() | map()) :: t()

schema()

@spec schema() :: Zoi.schema()