Jido.Observe.Config (Jido v2.2.0)

View Source

Resolves observability configuration with per-instance support.

Resolution order (highest priority first):

  1. Jido.Debug runtime override (persistent_term, per-instance)
  2. Per-instance app config (config :my_app, MyApp.Jido, telemetry: [...])
  3. Global app config (config :jido, :telemetry / config :jido, :observability)
  4. Hardcoded default

When instance is nil, steps 1-2 are skipped.

Summary

Functions

Returns Jido.Exec options aligned with the instance observability config.

Returns the effective Jido.Exec logger threshold for the given instance.

Returns the effective Jido.Exec telemetry mode for the given instance.

Returns true if debug-level logging is enabled.

Returns the debug events mode for the given instance.

Returns true if debug events are enabled.

Returns the maximum number of debug events to store.

Returns true if the signal type is considered interesting.

Returns the list of signal types considered interesting.

Returns true if the given log level is enabled.

Returns the observability log level for the given instance.

Returns true if sensitive data should be redacted.

Returns the slow directive threshold in milliseconds.

Returns the slow signal threshold in milliseconds.

Returns the argument logging mode for the given instance.

Returns the telemetry log level for the given instance.

Returns true if trace-level logging is enabled.

Returns the tracer module for the given instance.

Returns tracer callback failure handling mode.

Types

instance()

@type instance() :: atom() | nil

Functions

action_exec_opts(instance \\ nil, opts \\ [])

@spec action_exec_opts(
  instance(),
  keyword()
) :: keyword()

Returns Jido.Exec options aligned with the instance observability config.

Jido action execution only supports coarse logger thresholds, so :keys_only and :none argument modes are translated into a warning-or-higher threshold to suppress verbose action/context dumps. jido_action telemetry only supports :full or :silent, so non-full argument modes are translated into :silent to avoid leaking full action params/context through dependency telemetry spans. Full argument logging is only enabled when the instance opts into log_args: :full or Jido.debug(:verbose).

action_log_level(instance \\ nil)

@spec action_log_level(instance()) :: Logger.level()

Returns the effective Jido.Exec logger threshold for the given instance.

action_telemetry_mode(instance \\ nil)

@spec action_telemetry_mode(instance()) :: :full | :silent

Returns the effective Jido.Exec telemetry mode for the given instance.

debug_enabled?(instance \\ nil)

@spec debug_enabled?(instance()) :: boolean()

Returns true if debug-level logging is enabled.

debug_events(instance \\ nil)

@spec debug_events(instance()) :: :off | :minimal | :all

Returns the debug events mode for the given instance.

debug_events_enabled?(instance \\ nil)

@spec debug_events_enabled?(instance()) :: boolean()

Returns true if debug events are enabled.

debug_max_events(instance \\ nil)

@spec debug_max_events(instance()) :: non_neg_integer()

Returns the maximum number of debug events to store.

interesting_signal_type?(instance \\ nil, signal_type)

@spec interesting_signal_type?(instance(), String.t()) :: boolean()

Returns true if the signal type is considered interesting.

interesting_signal_types(instance \\ nil)

@spec interesting_signal_types(instance()) :: [String.t()]

Returns the list of signal types considered interesting.

level_enabled?(instance \\ nil, level)

@spec level_enabled?(instance(), atom()) :: boolean()

Returns true if the given log level is enabled.

observe_log_level(instance \\ nil)

@spec observe_log_level(instance()) :: Logger.level()

Returns the observability log level for the given instance.

redact_sensitive?(instance \\ nil)

@spec redact_sensitive?(instance()) :: boolean()

Returns true if sensitive data should be redacted.

slow_directive_threshold_ms(instance \\ nil)

@spec slow_directive_threshold_ms(instance()) :: non_neg_integer()

Returns the slow directive threshold in milliseconds.

slow_signal_threshold_ms(instance \\ nil)

@spec slow_signal_threshold_ms(instance()) :: non_neg_integer()

Returns the slow signal threshold in milliseconds.

telemetry_log_args(instance \\ nil)

@spec telemetry_log_args(instance()) :: :keys_only | :full | :none

Returns the argument logging mode for the given instance.

telemetry_log_level(instance \\ nil)

@spec telemetry_log_level(instance()) :: :trace | :debug | :info | :warning | :error

Returns the telemetry log level for the given instance.

trace_enabled?(instance \\ nil)

@spec trace_enabled?(instance()) :: boolean()

Returns true if trace-level logging is enabled.

tracer(instance \\ nil)

@spec tracer(instance()) :: module()

Returns the tracer module for the given instance.

tracer_failure_mode(instance \\ nil)

@spec tracer_failure_mode(instance()) :: :warn | :strict

Returns tracer callback failure handling mode.