Skip to content

v0.2.1

Choose a tag to compare

@ankurs ankurs released this 01 May 14:22
· 3 commits to main since this release
752f100

What's new

  • core.AddWorkerRunOptions(opts ...workers.RunOption) — init-time hook to configure run-level worker options (metrics, default jitter, run-level interceptors).
  • Default Prometheus worker metrics — core.Run() now wires workers.NewPrometheusMetrics(APP_NAME) automatically when APP_NAME is set and Prometheus isn't disabled. Worker lifecycle metrics (worker_started_total, worker_panicked_total, worker_active_count, worker_run_duration_seconds, etc.) now show up on /metrics for any service using CBWorkerProvider without per-worker setup.
  • A user-supplied workers.WithMetrics(...) via AddWorkerRunOptions overrides the default.

Bug fixed

Prior to this release, core.Run() invoked workers.Run with no RunOptions, so the workers package fell back to BaseMetrics{} (no-op) and every worker lifecycle metric silently stayed at zero in any service that adopted CBWorkerProvider (#87).

Compatibility

Additive only — no breaking changes. Services that don't set APP_NAME or that disable Prometheus continue to behave as before.