import { HashSet } from "@tsplus/stdlib/collections/HashSet/definition"; import { MetricLabel } from "@effect/core/io/Metrics/MetricLabel"; import { Effect } from "@effect/core/io/Effect/definition"; import { MetricKeyType } from "@effect/core/io/Metrics/MetricKeyType"; import { MetricState } from "@effect/core/io/Metrics/MetricState"; import type { HistogramBoundaries, HistogramBoundariesOps } from "@effect/core/io/Metrics/Boundaries"; export declare const MetricSym: unique symbol; export type MetricSym = typeof MetricSym; /** * A `Metric` represents a concurrent metric which accepts * updates of type `In` and are aggregated to a stateful value of type `Out`. * * For example, a counter metric would have type `Metric`, * representing the fact that the metric can be updated with numbers (the amount * to increment or decrement the counter by), and the state of the counter is a * number. * * There are five primitive metric types supported by Effect: * * - Counters * - Frequencies * - Gauges * - Histograms * - Summaries * * @tsplus type effect/core/io/Metrics/Metric */ export interface Metric { readonly [MetricSym]: MetricSym; readonly keyType: Type; readonly unsafeUpdate: (input: In, extraTags: HashSet) => void; readonly unsafeValue: (extraTags: HashSet) => Out; (effect: Effect): Effect; } /** * @tsplus type effect/core/io/Metrics/Metric.Ops */ export interface MetricOps { /** * The type of the underlying primitive metric. For example, this could be * `MetricKeyType.Counter` or `MetricKeyType.Gauge`. */ (keyType: Type, unsafeUpdate: (input: In, extraTags: HashSet) => void, unsafeValue: (extraTags: HashSet) => Out): Metric; } export declare const Metric: MetricOps; export declare namespace Metric { interface Counter extends Metric { } interface Gauge extends Metric { } interface Frequency extends Metric { } interface Histogram extends Metric { } interface Summary extends Metric { } namespace Histogram { type Boundaries = HistogramBoundaries; } } /** * @tsplus static effect/core/io/Metrics/Metric.Ops $ * @tsplus location "@effect/core/io/Metrics/definition" */ export declare const metricAspects: MetricAspects; /** * @tsplus static effect/core/io/Metrics/Metric.Ops Histogram * @tsplus location "@effect/core/io/Metrics/definition" */ export declare const histogramBoundaries: { readonly Boundaries: HistogramBoundariesOps; }; /** * @tsplus type effect/core/io/Metrics/Metric.Aspects */ export interface MetricAspects { } //# sourceMappingURL=definition.d.ts.map