Metric.counter for counting events
Use `Metric.counter` to count events—user signups, requests, errors. Call `Metric.increment(counter)` (or `incrementBy`) to add to the count. Metrics integrate with Effect pipelines.
- Use `Metric.counter(name, { description })` to create a counter
- Use `Metric.increment(counter)` or `Metric.incrementBy(counter, n)`
- Use `Metric.snapshot(counter)` to read the current value
Loading code editor...