Threadline.Health.Policy (Threadline v0.5.0)

Copy Markdown View Source

Validates :expected_uncovered_tables and :audit_anyway configuration for Threadline.Health.trigger_coverage/1's third bucket.

Adopters typically configure:

config :threadline, :health,
  expected_uncovered_tables: ["oban_jobs", "oban_peers", "oban_producers"],
  audit_anyway: []

Validate at boot in application.ex to fail loud on bad config:

Threadline.Health.Policy.validate!(Application.get_env(:threadline, :health, []))

Lazy validation at first poll tick is supported but discouraged in production — a delay between release and first dashboard tick can hide config errors.

Summary

Functions

Validates :expected_uncovered_tables and :audit_anyway config.

Functions

validate!(opts)

Validates :expected_uncovered_tables and :audit_anyway config.

Accepts a keyword list or a map (dual-form intake matching Threadline.Capture.RedactionPolicy.validate!/1).

Raises ArgumentError on:

  • non-binary entries inside either list
  • duplicate entries inside either list
  • unknown top-level keys
  • non-keyword / non-map input shape