t3-code-android-nightly/.repos/effect-smol/migration/annotations/effect__Metric.yaml
2026-09-07 21:54:44 -07:00

105 lines
6.5 KiB
YAML

effect/Metric#fiberActive:
replacement: "Metric.enableRuntimeMetrics + Metric.snapshot"
note: "The concrete metric is no longer exported. Enable runtime metrics, then read the Gauge snapshot whose id is child_fibers_active."
effect/Metric#fiberFailures:
replacement: "Metric.enableRuntimeMetrics + Metric.snapshot"
note: "The concrete metric is no longer exported. Enable runtime metrics, then read the Counter snapshot whose id is child_fiber_failures."
effect/Metric#fiberLifetimes:
replacement: "none"
note: "The built-in lifetime histogram was removed. Define a Metric.timer and instrument selected effects with Effect.trackDuration when lifetime data is required."
effect/Metric#fiberStarted:
replacement: "Metric.enableRuntimeMetrics + Metric.snapshot"
note: "The concrete metric is no longer exported. Enable runtime metrics, then read the Counter snapshot whose id is child_fibers_started."
effect/Metric#fiberSuccesses:
replacement: "Metric.enableRuntimeMetrics + Metric.snapshot"
note: "The concrete metric is no longer exported. Enable runtime metrics, then read the Counter snapshot whose id is child_fiber_successes."
effect/Metric#fromMetricKey:
replacement: "Metric.counter / Metric.gauge / Metric.frequency / Metric.histogram / Metric.summary"
note: "MetricKey and MetricKeyType were removed. Construct the required primitive metric directly."
effect/Metric#globalMetricRegistry:
replacement: "Metric.MetricRegistry"
note: "The process-global registry became a Context.Reference whose service is a Map. Access it in context or provide a fresh Map for isolation; use Metric.snapshot for normal reads."
effect/Metric#increment:
replacement: "Metric.update / Metric.modify"
note: "Use Metric.update(counter, 1 or 1n) for counters and Metric.modify(gauge, 1 or 1n) for gauges; gauge update sets an absolute value while modify adds a delta."
effect/Metric#incrementBy:
replacement: "Metric.update / Metric.modify"
note: "Use Metric.update(counter, amount) for counters and Metric.modify(gauge, amount) for gauges."
effect/Metric#make:
replacement: "none"
note: "The low-level arbitrary metric constructor was removed. Use a public primitive constructor and compose with mapInput, withConstantInput, and withAttributes."
effect/Metric#map:
replacement: "Metric.value + Effect.map"
note: "Metric-level state mapping was removed. Transform a read with Effect.map(Metric.value(metric), f)."
effect/Metric#mapType:
replacement: "none"
note: "Drop this call. V4 Metric has no key-type type parameter and exposes a fixed runtime type discriminator."
effect/Metric#Metric:
replacement: "Metric.Metric<Input, State>"
note: "Drop the v3 key-type parameter. Metrics are no longer callable; use Effect.trackSuccesses for instrumentation and Metric.update or Metric.value for operations."
effect/Metric#Metric.Variance:
replacement: "none"
note: "The public variance interface was removed; Metric<Input, State> carries variance markers directly."
effect/Metric#MetricApply:
replacement: "none"
note: "Removed with Metric.make; v4 has no public low-level custom-metric constructor type."
effect/Metric#MetricTypeId:
replacement: "Metric.isMetric"
note: "The public unique-symbol type id was removed; use Metric.isMetric for runtime refinement."
effect/Metric#set:
replacement: "Metric.update"
note: "Use Metric.update(gauge, value); v4 update replaces a gauge's current value."
effect/Metric#succeed:
replacement: "none"
note: "Constant synthetic metrics were removed. Keep constants outside the metric and use Effect.succeed when an Effect value is required."
effect/Metric#summaryTimestamp:
replacement: "Metric.summaryWithTimestamp"
note: "Renamed and called as Metric.summaryWithTimestamp(name, options). Remove the v3 error option; inputs remain value/timestamp pairs."
effect/Metric#sync:
replacement: "none"
note: "Lazy synthetic metrics were removed. Keep the computation outside the metric and use Effect.sync when an Effect value is required."
effect/Metric#tagged:
replacement: "Metric.withAttributes"
note: "Replace tags with attributes, for example Metric.withAttributes(metric, { [key]: value })."
effect/Metric#taggedWithLabels:
replacement: "Metric.withAttributes"
note: "Replace MetricLabel objects with a string record or array of string tuples passed to Metric.withAttributes."
effect/Metric#taggedWithLabelsInput:
replacement: "Metric.withAttributes + Metric.update"
note: "No dynamic-attribute transform remains. Compute attributes at each update or tracking site, wrap with Metric.withAttributes, then update the metric."
effect/Metric#timerWithBoundaries:
replacement: "Metric.timer"
note: "Use Metric.timer(name, { boundaries, description }); boundaries moved into the options object."
effect/Metric#trackAll:
replacement: "Effect.track"
note: "Moved to Effect; use effect.pipe(Effect.track(metric, () => input))."
effect/Metric#trackDefect:
replacement: "Effect.trackDefects"
note: "Moved to Effect; use effect.pipe(Effect.trackDefects(metric))."
effect/Metric#trackDefectWith:
replacement: "Effect.trackDefects"
note: "Moved to Effect; pass the mapper as the optional second argument."
effect/Metric#trackDurationWith:
replacement: "Effect.trackDuration"
note: "Moved to Effect; pass the mapper as the optional second argument. V4 records duration on every Exit, whereas v3 updated only after success."
effect/Metric#trackError:
replacement: "Effect.trackErrors"
note: "Moved to Effect; use effect.pipe(Effect.trackErrors(metric))."
effect/Metric#trackErrorWith:
replacement: "Effect.trackErrors"
note: "Moved to Effect; pass the mapper as the optional second argument."
effect/Metric#trackSuccess:
replacement: "Effect.trackSuccesses"
note: "Moved to Effect; use effect.pipe(Effect.trackSuccesses(metric))."
effect/Metric#trackSuccessWith:
replacement: "Effect.trackSuccesses"
note: "Moved to Effect; pass the mapper as the optional second argument."
effect/Metric#unsafeSnapshot:
replacement: "Metric.snapshotUnsafe"
note: "Renamed and now requires an explicit Context.Context<never>. It returns structural snapshots rather than MetricPair values."
effect/Metric#withNow:
replacement: "Metric.summary"
note: "Metric.summary reads the current Clock automatically; use Metric.summaryWithTimestamp when timestamps are supplied explicitly. The generic timestamp-injecting combinator was removed."
effect/Metric#zip:
replacement: "Effect.all + Metric.update / Metric.value"
note: "Composite metrics were removed. Use Effect.all to update both metrics or combine their Metric.value reads."