import { Equals } from "@tsplus/stdlib/structure/Equals"; import { HashSet } from "@tsplus/stdlib/collections/HashSet/definition"; import { MetricLabel } from "@effect/core/io/Metrics/MetricLabel"; import { Hash } from "@tsplus/stdlib/structure/Hash"; import { MetricKeyType } from "@effect/core/io/Metrics/MetricKeyType"; import { Metric } from "@effect/core/io/Metrics/definition"; import { Duration } from "@tsplus/stdlib/data/Duration"; import { Chunk } from "@tsplus/stdlib/collections/Chunk/definition"; import { Collection } from "@tsplus/stdlib/collections/Collection/definition"; export declare const MetricKeySym: unique symbol; export type MetricKeySym = typeof MetricKeySym; /** * A `MetricKey` is a unique key associated with each metric. The key is based * on a combination of the metric type, the name and tags associated with the * metric, and any other information to describe a a metric, such as the * boundaries of a histogram. In this way, it is impossible to ever create * different metrics with conflicting keys. * * @tsplus type effect/core/io/Metrics/MetricKey * @tsplus companion effect/core/io/Metrics/MetricKey.Ops */ export declare class MetricKey implements Equals { readonly name: string; readonly keyType: Type; readonly tags: HashSet; readonly [MetricKeySym]: MetricKeySym; constructor(name: string, keyType: Type, tags?: HashSet); [Hash.sym](): number; [Equals.sym](u: unknown): boolean; } export declare namespace MetricKey { type Untyped = MetricKey; type Counter = MetricKey; type Gauge = MetricKey; type Frequency = MetricKey; type Histogram = MetricKey; type Summary = MetricKey; } /** * Creates a metric key for a counter, with the specified name. * @tsplus static effect/core/io/Metrics/MetricKey.Ops Counter * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function counter(name: string): MetricKey.Counter; /** * Creates a metric key for a gauge, with the specified name. * @tsplus static effect/core/io/Metrics/MetricKey.Ops Gauge * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function gauge(name: string): MetricKey.Gauge; /** * Creates a metric key for a categorical frequency table, with the specified * name. * @tsplus static effect/core/io/Metrics/MetricKey.Ops Frequency * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function frequency(name: string): MetricKey.Frequency; /** * Creates a metric key for a histogram, with the specified name and boundaries. * @tsplus static effect/core/io/Metrics/MetricKey.Ops Histogram * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function histogram(name: string, boundaries: Metric.Histogram.Boundaries): MetricKey.Histogram; /** * Creates a metric key for a histogram, with the specified name, maxAge, * maxSize, error, and quantiles. * @tsplus static effect/core/io/Metrics/MetricKey.Ops Summary * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function summary(name: string, maxAge: Duration, maxSize: number, error: number, quantiles: Chunk): MetricKey.Summary; /** * Returns a new `MetricKey` with the specified tag appended. * @tsplus static effect/core/io/Metrics/MetricKey.Aspects tagged * @tsplus pipeable effect/core/io/Metrics/MetricKey tagged * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function tagged(key: string, value: string): (self: MetricKey) => MetricKey; /** * Returns a new `MetricKey` with the specified tags appended. * @tsplus static effect/core/io/Metrics/MetricKey.Aspects taggedWithLabels * @tsplus pipeable effect/core/io/Metrics/MetricKey taggedWithLabels * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function taggedWithLabels(extraTags: Collection): (self: MetricKey) => MetricKey; /** * Returns a new `MetricKey` with the specified tags appended. * @tsplus static effect/core/io/Metrics/MetricKey.Aspects taggedWithLabelSet * @tsplus pipeable effect/core/io/Metrics/MetricKey taggedWithLabelSet * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function taggedWithLabelSet(extraTags: HashSet): (self: MetricKey) => MetricKey; /** * @tsplus static effect/core/io/Metrics/MetricKey.Ops isMetricKey * @tsplus location "@effect/core/io/Metrics/MetricKey" */ export declare function isMetricKey(u: unknown): u is MetricKey; //# sourceMappingURL=MetricKey.d.ts.map