Skip to content

Commit

Permalink
fix: default effect counters should be right type. (#2373)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim <[email protected]>
  • Loading branch information
patroza and tim-smart authored Mar 20, 2024
1 parent 64a250d commit 9bbde5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-pets-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

Use incremental counters instead of up-down for runtime metrics
6 changes: 3 additions & 3 deletions packages/effect/src/internal/fiberRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ import * as tracer from "./tracer.js"
import * as version from "./version.js"

/** @internal */
export const fiberStarted = metric.counter("effect_fiber_started")
export const fiberStarted = metric.counter("effect_fiber_started", { incremental: true })
/** @internal */
export const fiberActive = metric.counter("effect_fiber_active")
/** @internal */
export const fiberSuccesses = metric.counter("effect_fiber_successes")
export const fiberSuccesses = metric.counter("effect_fiber_successes", { incremental: true })
/** @internal */
export const fiberFailures = metric.counter("effect_fiber_failures")
export const fiberFailures = metric.counter("effect_fiber_failures", { incremental: true })
/** @internal */
export const fiberLifetimes = metric.tagged(
metric.histogram(
Expand Down

0 comments on commit 9bbde5b

Please sign in to comment.