Public telemetry contract for Oban Powertools.
Phase 8 freezes five event families under the [:oban_powertools, family, event_suffix]
prefix:
:operator_action:limiter:cron:workflow:lifeline
The public measurement key is :count.
Allowed low-cardinality metadata keys per family:
:operator_action->[:action, :source]:limiter->[:action, :blocker_code, :resource, :scope]:cron->[:action, :source, :overlap_policy, :catch_up_policy]:workflow->:step_completed->[:outcome, :terminal_cause, :semantics_version]:step_unblocked->[:scope, :state, :semantics_version]:cascade_cancelled->[:scope, :outcome, :terminal_cause, :semantics_version]:workflow_terminal->[:state, :outcome, :terminal_cause, :semantics_version]
:lifeline->[:action, :incident_class, :target_type, :outcome, :archived_count, :pruned_count]
IDs, job args, preview tokens, and free-form reasons are intentionally excluded from this public API.
Summary
Functions
Returns the public telemetry contract for event families, measurements, and metadata keys.
Executes a telemetry event for an operator action.
Returns a list of Telemetry.Metrics counter definitions for the 5 frozen Oban Powertools
event families: :operator_action, :limiter, :cron, :workflow, and :lifeline.
Functions
Returns the public telemetry contract for event families, measurements, and metadata keys.
Executes a telemetry event for an operator action.
Returns a list of Telemetry.Metrics counter definitions for the 5 frozen Oban Powertools
event families: :operator_action, :limiter, :cron, :workflow, and :lifeline.
Each metric's :tags is a strict subset of the frozen @contract for that family and suffix,
ensuring low-cardinality safety (SC-4). No Oban-core [:oban, :job, *] metrics are emitted —
these are Powertools control-plane metrics only.
This function is opt-in. It requires the :telemetry_metrics dependency to be present
in the host application. If called without :telemetry_metrics loaded, it raises a
RuntimeError with instructions to add the dependency — it does NOT return an empty list.
Usage
# In your application's Telemetry supervisor:
{Telemetry.Metrics.ConsoleReporter,
metrics: ObanPowertools.Telemetry.metrics()}Add :telemetry_metrics to your mix.exs deps:
{:telemetry_metrics, "~> 1.0"}