EffectTalk

Composing metrics in pipelines

Metrics compose with Effect. Add Metric.increment or Metric.trackDuration to your pipeline without changing core logic. Observability stays at the edges.

  • Use Metric.trackDuration(timer)(effect) to wrap an operation
  • Use Effect.tap(() => Metric.increment(counter)) to count
  • Metrics don't change the success value
Loading code editor...