Socket
Socket
Sign inDemoInstall

@effect/io

Package Overview
Dependencies
Maintainers
3
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/io - npm Package Compare versions

Comparing version 0.26.1 to 0.26.2

4

internal_effect_untraced/configProvider.js

@@ -248,6 +248,6 @@ "use strict";

if (Either.isLeft(left) && Either.isRight(right)) {
return core.fail(left.left);
return core.succeed(right.right);
}
if (Either.isRight(left) && Either.isLeft(right)) {
return core.fail(right.left);
return core.succeed(left.right);
}

@@ -254,0 +254,0 @@ if (Either.isRight(left) && Either.isRight(right)) {

@@ -13,2 +13,4 @@ "use strict";

var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core"));
var effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/effect"));
var executionStrategy = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/executionStrategy"));
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime"));

@@ -665,4 +667,8 @@ var queue = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/queue"));

return Debug.bodyWithTrace(trace => core.uninterruptible(core.withFiberRuntime(state => {
MutableRef.set(true)(this.shutdownFlag);
return core.asUnit(core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0))(core.zipRight(core.sync(() => this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers)))(core.zipRight(core.sync(() => this.subscription.unsubscribe()))(fiberRuntime.forEachPar(d => core.deferredInterruptWith(d, state.id()))(unsafePollAllQueue(this.pollers))))));
MutableRef.set(this.shutdownFlag, true);
return core.asUnit(core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0))(core.zipRight(core.sync(() => {
this.subscribers.delete(this.subscription);
this.subscription.unsubscribe();
this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
}))(fiberRuntime.forEachPar(d => core.deferredInterruptWith(d, state.id()))(unsafePollAllQueue(this.pollers)))));
}).traced(trace)));

@@ -798,3 +804,3 @@ }

subscribe() {
return Debug.bodyWithTrace(trace => fiberRuntime.acquireRelease(core.tap(dequeue => this.scope.addFinalizer(() => dequeue.shutdown()))(makeSubscription(this.hub, this.subscribers, this.strategy)), dequeue => dequeue.shutdown()).traced(trace));
return Debug.bodyWithTrace(trace => core.map(fiberRuntime.acquireRelease(core.tap(effect.all(this.scope.fork(executionStrategy.sequential), makeSubscription(this.hub, this.subscribers, this.strategy)), tuple => tuple[0].addFinalizer(() => tuple[1].shutdown())), (tuple, exit) => tuple[0].close(exit)), tuple => tuple[1]).traced(trace));
}

@@ -801,0 +807,0 @@ offer(value) {

@@ -51,6 +51,6 @@ "use strict";

exports.contramap = contramap;
const counter = name => fromMetricKey(metricKey.counter(name));
const counter = (name, description) => fromMetricKey(metricKey.counter(name, description));
/** @internal */
exports.counter = counter;
const frequency = name => fromMetricKey(metricKey.frequency(name));
const frequency = (name, description) => fromMetricKey(metricKey.frequency(name, description));
/** @internal */

@@ -70,6 +70,6 @@ exports.frequency = frequency;

exports.fromMetricKey = fromMetricKey;
const gauge = name => fromMetricKey(metricKey.gauge(name));
const gauge = (name, description) => fromMetricKey(metricKey.gauge(name, description));
/** @internal */
exports.gauge = gauge;
const histogram = (name, boundaries) => fromMetricKey(metricKey.histogram(name, boundaries));
const histogram = (name, boundaries, description) => fromMetricKey(metricKey.histogram(name, boundaries, description));
/* @internal */

@@ -101,6 +101,6 @@ exports.histogram = histogram;

exports.sync = sync;
const summary = (name, maxAge, maxSize, error, quantiles) => withNow(summaryTimestamp(name, maxAge, maxSize, error, quantiles));
const summary = (name, maxAge, maxSize, error, quantiles, description) => withNow(summaryTimestamp(name, maxAge, maxSize, error, quantiles, description));
/** @internal */
exports.summary = summary;
const summaryTimestamp = (name, maxAge, maxSize, error, quantiles) => fromMetricKey(metricKey.summary(name, maxAge, maxSize, error, quantiles));
const summaryTimestamp = (name, maxAge, maxSize, error, quantiles, description) => fromMetricKey(metricKey.summary(name, maxAge, maxSize, error, quantiles, description));
/** @internal */

@@ -107,0 +107,0 @@ exports.summaryTimestamp = summaryTimestamp;

@@ -11,2 +11,3 @@ "use strict";

var HashSet = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/HashSet"));
var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
var metricKeyType = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/keyType"));

@@ -28,5 +29,6 @@ var metricLabel = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/label"));

class MetricKeyImpl {
constructor(name, keyType, tags = HashSet.empty()) {
constructor(name, keyType, description, tags = HashSet.empty()) {
this.name = name;
this.keyType = keyType;
this.description = description;
this.tags = tags;

@@ -36,37 +38,25 @@ this[_a] = metricKeyVariance;

[(_a = MetricKeyTypeId, Hash.symbol)]() {
return Hash.combine(Hash.hash(this.tags))(Hash.combine(Hash.hash(this.keyType))(Hash.hash(this.name)));
return Hash.combine(Hash.hash(this.tags))(Hash.combine(Hash.hash(this.description))(Hash.combine(Hash.hash(this.keyType))(Hash.hash(this.name))));
}
[Equal.symbol](u) {
return isMetricKey(u) && this.name === u.name && Equal.equals(this.keyType, u.keyType) && Equal.equals(this.tags, u.tags);
return isMetricKey(u) && this.name === u.name && Equal.equals(this.keyType, u.keyType) && Equal.equals(this.description, u.description) && Equal.equals(this.tags, u.tags);
}
}
/** @internal */
const isMetricKey = u => {
return typeof u === "object" && u != null && MetricKeyTypeId in u;
};
const isMetricKey = u => typeof u === "object" && u != null && MetricKeyTypeId in u;
/** @internal */
exports.isMetricKey = isMetricKey;
const counter = name => {
return new MetricKeyImpl(name, metricKeyType.counter);
};
const counter = (name, description) => new MetricKeyImpl(name, metricKeyType.counter, Option.fromNullable(description));
/** @internal */
exports.counter = counter;
const frequency = name => {
return new MetricKeyImpl(name, metricKeyType.frequency);
};
const frequency = (name, description) => new MetricKeyImpl(name, metricKeyType.frequency, Option.fromNullable(description));
/** @internal */
exports.frequency = frequency;
const gauge = name => {
return new MetricKeyImpl(name, metricKeyType.gauge);
};
const gauge = (name, description) => new MetricKeyImpl(name, metricKeyType.gauge, Option.fromNullable(description));
/** @internal */
exports.gauge = gauge;
const histogram = (name, boundaries) => {
return new MetricKeyImpl(name, metricKeyType.histogram(boundaries));
};
const histogram = (name, boundaries, description) => new MetricKeyImpl(name, metricKeyType.histogram(boundaries), Option.fromNullable(description));
/** @internal */
exports.histogram = histogram;
const summary = (name, maxAge, maxSize, error, quantiles) => {
return new MetricKeyImpl(name, metricKeyType.summary(maxAge, maxSize, error, quantiles));
};
const summary = (name, maxAge, maxSize, error, quantiles, description) => new MetricKeyImpl(name, metricKeyType.summary(maxAge, maxSize, error, quantiles), Option.fromNullable(description));
/** @internal */

@@ -80,4 +70,4 @@ exports.summary = summary;

exports.taggedWithLabels = taggedWithLabels;
const taggedWithLabelSet = /*#__PURE__*/(0, _Function.dual)(2, (self, extraTags) => HashSet.size(extraTags) === 0 ? self : new MetricKeyImpl(self.name, self.keyType, HashSet.union(extraTags)(self.tags)));
const taggedWithLabelSet = /*#__PURE__*/(0, _Function.dual)(2, (self, extraTags) => HashSet.size(extraTags) === 0 ? self : new MetricKeyImpl(self.name, self.keyType, self.description, HashSet.union(extraTags)(self.tags)));
exports.taggedWithLabelSet = taggedWithLabelSet;
//# sourceMappingURL=key.js.map

@@ -138,3 +138,3 @@ /**

*/
export declare const counter: (name: string) => Metric.Counter<number>;
export declare const counter: (name: string, description?: string) => Metric.Counter<number>;
/**

@@ -147,3 +147,3 @@ * A string histogram metric, which keeps track of the counts of different

*/
export declare const frequency: (name: string) => Metric.Frequency<string>;
export declare const frequency: (name: string, description?: string) => Metric.Frequency<string>;
/**

@@ -172,3 +172,3 @@ * Returns a new metric that is powered by this one, but which accepts updates

*/
export declare const gauge: (name: string) => Metric.Gauge<number>;
export declare const gauge: (name: string, description?: string) => Metric.Gauge<number>;
/**

@@ -181,3 +181,3 @@ * A numeric histogram metric, which keeps track of the count of numbers that

*/
export declare const histogram: (name: string, boundaries: MetricBoundaries.MetricBoundaries) => Metric<MetricKeyType.MetricKeyType.Histogram, number, MetricState.MetricState.Histogram>;
export declare const histogram: (name: string, boundaries: MetricBoundaries.MetricBoundaries, description?: string) => Metric<MetricKeyType.MetricKeyType.Histogram, number, MetricState.MetricState.Histogram>;
/**

@@ -249,3 +249,3 @@ * @since 1.0.0

*/
export declare const summary: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>) => Metric.Summary<number>;
export declare const summary: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>, description?: string) => Metric.Summary<number>;
/**

@@ -255,3 +255,3 @@ * @since 1.0.0

*/
export declare const summaryTimestamp: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>) => Metric.Summary<readonly [value: number, timestamp: number]>;
export declare const summaryTimestamp: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>, description?: string) => Metric.Summary<readonly [value: number, timestamp: number]>;
/**

@@ -258,0 +258,0 @@ * Returns a new metric, which is identical in every way to this one, except

@@ -8,2 +8,3 @@ /**

import type * as HashSet from "@effect/data/HashSet";
import type * as Option from "@effect/data/Option";
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries";

@@ -25,5 +26,5 @@ import type * as MetricKeyType from "@effect/io/Metric/KeyType";

* on a combination of the metric type, the name and tags associated with the
* metric, and any other information to describe a metric, such as the
* boundaries of a histogram. In this way, it is impossible to ever create
* different metrics with conflicting keys.
* metric, an optional description of the key, and any other information to
* describe a metric, such as the boundaries of a histogram. In this way, it is
* impossible to ever create different metrics with conflicting keys.
*

@@ -36,2 +37,3 @@ * @since 1.0.0

readonly keyType: Type;
readonly description: Option.Option<string>;
readonly tags: HashSet.HashSet<MetricLabel.MetricLabel>;

@@ -94,3 +96,3 @@ }

*/
export declare const counter: (name: string) => MetricKey.Counter;
export declare const counter: (name: string, description?: string) => MetricKey.Counter;
/**

@@ -103,3 +105,3 @@ * Creates a metric key for a categorical frequency table, with the specified

*/
export declare const frequency: (name: string) => MetricKey.Frequency;
export declare const frequency: (name: string, description?: string) => MetricKey.Frequency;
/**

@@ -111,3 +113,3 @@ * Creates a metric key for a gauge, with the specified name.

*/
export declare const gauge: (name: string) => MetricKey.Gauge;
export declare const gauge: (name: string, description?: string) => MetricKey.Gauge;
/**

@@ -119,3 +121,3 @@ * Creates a metric key for a histogram, with the specified name and boundaries.

*/
export declare const histogram: (name: string, boundaries: MetricBoundaries.MetricBoundaries) => MetricKey.Histogram;
export declare const histogram: (name: string, boundaries: MetricBoundaries.MetricBoundaries, description?: string) => MetricKey.Histogram;
/**

@@ -128,3 +130,3 @@ * Creates a metric key for a summary, with the specified name, maxAge,

*/
export declare const summary: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>) => MetricKey.Summary;
export declare const summary: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>, description?: string) => MetricKey.Summary;
/**

@@ -131,0 +133,0 @@ * Returns a new `MetricKey` with the specified tag appended.

{
"name": "@effect/io",
"version": "0.26.1",
"version": "0.26.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

WIP.
Docs: https://effect-ts.github.io/io
Effect Docs: https://www.effect.website<br>
Module Docs: https://effect-ts.github.io/io

@@ -5,0 +6,0 @@ # Contributing Guidelines

@@ -537,6 +537,6 @@ import * as Context from "@effect/data/Context"

if (Either.isLeft(left) && Either.isRight(right)) {
return core.fail(left.left)
return core.succeed(right.right)
}
if (Either.isRight(left) && Either.isLeft(right)) {
return core.fail(right.left)
return core.succeed(left.right)
}

@@ -543,0 +543,0 @@ if (Either.isRight(left) && Either.isRight(right)) {

@@ -11,2 +11,4 @@ import * as Chunk from "@effect/data/Chunk"

import * as core from "@effect/io/internal_effect_untraced/core"
import * as effect from "@effect/io/internal_effect_untraced/effect"
import * as executionStrategy from "@effect/io/internal_effect_untraced/executionStrategy"
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime"

@@ -889,8 +891,11 @@ import * as queue from "@effect/io/internal_effect_untraced/queue"

core.withFiberRuntime<never, never, void>((state) => {
pipe(this.shutdownFlag, MutableRef.set(true))
MutableRef.set(this.shutdownFlag, true)
return pipe(
unsafePollAllQueue(this.pollers),
fiberRuntime.forEachPar((d) => core.deferredInterruptWith(d, state.id())),
core.zipRight(core.sync(() => this.subscription.unsubscribe())),
core.zipRight(core.sync(() => this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers))),
core.zipRight(core.sync(() => {
this.subscribers.delete(this.subscription)
this.subscription.unsubscribe()
this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers)
})),
core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0)),

@@ -1130,8 +1135,14 @@ core.asUnit

return Debug.bodyWithTrace((trace) =>
fiberRuntime.acquireRelease(
pipe(
makeSubscription(this.hub, this.subscribers, this.strategy),
core.tap((dequeue) => this.scope.addFinalizer(() => dequeue.shutdown()))
core.map(
fiberRuntime.acquireRelease(
core.tap(
effect.all(
this.scope.fork(executionStrategy.sequential),
makeSubscription(this.hub, this.subscribers, this.strategy)
),
(tuple) => tuple[0].addFinalizer(() => tuple[1].shutdown())
),
(tuple, exit) => tuple[0].close(exit)
),
(dequeue) => dequeue.shutdown()
(tuple) => tuple[1]
).traced(trace)

@@ -1138,0 +1149,0 @@ )

@@ -85,6 +85,8 @@ import * as Chunk from "@effect/data/Chunk"

/** @internal */
export const counter = (name: string): Metric.Metric.Counter<number> => fromMetricKey(metricKey.counter(name))
export const counter = (name: string, description?: string): Metric.Metric.Counter<number> =>
fromMetricKey(metricKey.counter(name, description))
/** @internal */
export const frequency = (name: string): Metric.Metric.Frequency<string> => fromMetricKey(metricKey.frequency(name))
export const frequency = (name: string, description?: string): Metric.Metric.Frequency<string> =>
fromMetricKey(metricKey.frequency(name, description))

@@ -120,7 +122,8 @@ /** @internal */

/** @internal */
export const gauge = (name: string): Metric.Metric.Gauge<number> => fromMetricKey(metricKey.gauge(name))
export const gauge = (name: string, description?: string): Metric.Metric.Gauge<number> =>
fromMetricKey(metricKey.gauge(name, description))
/** @internal */
export const histogram = (name: string, boundaries: MetricBoundaries.MetricBoundaries) =>
fromMetricKey(metricKey.histogram(name, boundaries))
export const histogram = (name: string, boundaries: MetricBoundaries.MetricBoundaries, description?: string) =>
fromMetricKey(metricKey.histogram(name, boundaries, description))

@@ -188,4 +191,5 @@ /* @internal */

error: number,
quantiles: Chunk.Chunk<number>
): Metric.Metric.Summary<number> => withNow(summaryTimestamp(name, maxAge, maxSize, error, quantiles))
quantiles: Chunk.Chunk<number>,
description?: string
): Metric.Metric.Summary<number> => withNow(summaryTimestamp(name, maxAge, maxSize, error, quantiles, description))

@@ -198,5 +202,6 @@ /** @internal */

error: number,
quantiles: Chunk.Chunk<number>
quantiles: Chunk.Chunk<number>,
description?: string
): Metric.Metric.Summary<readonly [value: number, timestamp: number]> =>
fromMetricKey(metricKey.summary(name, maxAge, maxSize, error, quantiles))
fromMetricKey(metricKey.summary(name, maxAge, maxSize, error, quantiles, description))

@@ -203,0 +208,0 @@ /** @internal */

@@ -7,2 +7,3 @@ import type * as Chunk from "@effect/data/Chunk"

import * as HashSet from "@effect/data/HashSet"
import * as Option from "@effect/data/Option"
import * as metricKeyType from "@effect/io/internal_effect_untraced/metric/keyType"

@@ -34,2 +35,3 @@ import * as metricLabel from "@effect/io/internal_effect_untraced/metric/label"

readonly keyType: Type,
readonly description: Option.Option<string>,
readonly tags: HashSet.HashSet<MetricLabel.MetricLabel> = HashSet.empty()

@@ -41,2 +43,3 @@ ) {}

Hash.combine(Hash.hash(this.keyType)),
Hash.combine(Hash.hash(this.description)),
Hash.combine(Hash.hash(this.tags))

@@ -49,2 +52,3 @@ )

Equal.equals(this.keyType, u.keyType) &&
Equal.equals(this.description, u.description) &&
Equal.equals(this.tags, u.tags)

@@ -55,20 +59,16 @@ }

/** @internal */
export const isMetricKey = (u: unknown): u is MetricKey.MetricKey<MetricKeyType.MetricKeyType<unknown, unknown>> => {
return typeof u === "object" && u != null && MetricKeyTypeId in u
}
export const isMetricKey = (u: unknown): u is MetricKey.MetricKey<MetricKeyType.MetricKeyType<unknown, unknown>> =>
typeof u === "object" && u != null && MetricKeyTypeId in u
/** @internal */
export const counter = (name: string): MetricKey.MetricKey.Counter => {
return new MetricKeyImpl(name, metricKeyType.counter)
}
export const counter = (name: string, description?: string): MetricKey.MetricKey.Counter =>
new MetricKeyImpl(name, metricKeyType.counter, Option.fromNullable(description))
/** @internal */
export const frequency = (name: string): MetricKey.MetricKey.Frequency => {
return new MetricKeyImpl(name, metricKeyType.frequency)
}
export const frequency = (name: string, description?: string): MetricKey.MetricKey.Frequency =>
new MetricKeyImpl(name, metricKeyType.frequency, Option.fromNullable(description))
/** @internal */
export const gauge = (name: string): MetricKey.MetricKey.Gauge => {
return new MetricKeyImpl(name, metricKeyType.gauge)
}
export const gauge = (name: string, description?: string): MetricKey.MetricKey.Gauge =>
new MetricKeyImpl(name, metricKeyType.gauge, Option.fromNullable(description))

@@ -78,6 +78,10 @@ /** @internal */

name: string,
boundaries: MetricBoundaries.MetricBoundaries
): MetricKey.MetricKey.Histogram => {
return new MetricKeyImpl(name, metricKeyType.histogram(boundaries))
}
boundaries: MetricBoundaries.MetricBoundaries,
description?: string
): MetricKey.MetricKey.Histogram =>
new MetricKeyImpl(
name,
metricKeyType.histogram(boundaries),
Option.fromNullable(description)
)

@@ -90,6 +94,10 @@ /** @internal */

error: number,
quantiles: Chunk.Chunk<number>
): MetricKey.MetricKey.Summary => {
return new MetricKeyImpl(name, metricKeyType.summary(maxAge, maxSize, error, quantiles))
}
quantiles: Chunk.Chunk<number>,
description?: string
): MetricKey.MetricKey.Summary =>
new MetricKeyImpl(
name,
metricKeyType.summary(maxAge, maxSize, error, quantiles),
Option.fromNullable(description)
)

@@ -138,2 +146,2 @@ /** @internal */

? self
: new MetricKeyImpl(self.name, self.keyType, pipe(self.tags, HashSet.union(extraTags))))
: new MetricKeyImpl(self.name, self.keyType, self.description, pipe(self.tags, HashSet.union(extraTags))))

@@ -160,3 +160,3 @@ /**

*/
export const counter: (name: string) => Metric.Counter<number> = internal.counter
export const counter: (name: string, description?: string) => Metric.Counter<number> = internal.counter

@@ -170,3 +170,3 @@ /**

*/
export const frequency: (name: string) => Metric.Frequency<string> = internal.frequency
export const frequency: (name: string, description?: string) => Metric.Frequency<string> = internal.frequency

@@ -201,3 +201,3 @@ /**

*/
export const gauge: (name: string) => Metric.Gauge<number> = internal.gauge
export const gauge: (name: string, description?: string) => Metric.Gauge<number> = internal.gauge

@@ -213,3 +213,4 @@ /**

name: string,
boundaries: MetricBoundaries.MetricBoundaries
boundaries: MetricBoundaries.MetricBoundaries,
description?: string
) => Metric<MetricKeyType.MetricKeyType.Histogram, number, MetricState.MetricState.Histogram> = internal.histogram

@@ -297,3 +298,4 @@

error: number,
quantiles: Chunk.Chunk<number>
quantiles: Chunk.Chunk<number>,
description?: string
) => Metric.Summary<number> = internal.summary

@@ -310,3 +312,4 @@

error: number,
quantiles: Chunk.Chunk<number>
quantiles: Chunk.Chunk<number>,
description?: string
) => Metric.Summary<readonly [value: number, timestamp: number]> = internal.summaryTimestamp

@@ -313,0 +316,0 @@

@@ -8,2 +8,3 @@ /**

import type * as HashSet from "@effect/data/HashSet"
import type * as Option from "@effect/data/Option"
import * as internal from "@effect/io/internal_effect_untraced/metric/key"

@@ -29,5 +30,5 @@ import type * as MetricBoundaries from "@effect/io/Metric/Boundaries"

* on a combination of the metric type, the name and tags associated with the
* metric, and any other information to describe a metric, such as the
* boundaries of a histogram. In this way, it is impossible to ever create
* different metrics with conflicting keys.
* metric, an optional description of the key, and any other information to
* describe a metric, such as the boundaries of a histogram. In this way, it is
* impossible to ever create different metrics with conflicting keys.
*

@@ -42,2 +43,3 @@ * @since 1.0.0

readonly keyType: Type
readonly description: Option.Option<string>
readonly tags: HashSet.HashSet<MetricLabel.MetricLabel>

@@ -110,3 +112,3 @@ }

*/
export const counter: (name: string) => MetricKey.Counter = internal.counter
export const counter: (name: string, description?: string) => MetricKey.Counter = internal.counter

@@ -120,3 +122,3 @@ /**

*/
export const frequency: (name: string) => MetricKey.Frequency = internal.frequency
export const frequency: (name: string, description?: string) => MetricKey.Frequency = internal.frequency

@@ -129,3 +131,3 @@ /**

*/
export const gauge: (name: string) => MetricKey.Gauge = internal.gauge
export const gauge: (name: string, description?: string) => MetricKey.Gauge = internal.gauge

@@ -138,4 +140,7 @@ /**

*/
export const histogram: (name: string, boundaries: MetricBoundaries.MetricBoundaries) => MetricKey.Histogram =
internal.histogram
export const histogram: (
name: string,
boundaries: MetricBoundaries.MetricBoundaries,
description?: string
) => MetricKey.Histogram = internal.histogram

@@ -154,3 +159,4 @@ /**

error: number,
quantiles: Chunk.Chunk<number>
quantiles: Chunk.Chunk<number>,
description?: string
) => MetricKey.Summary = internal.summary

@@ -157,0 +163,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc