Jido.Observe.Config (Jido v2.0.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 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.

Types

instance()

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

Functions

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.