Effect<string, never, never>Returns a human-readable string representation of all currently registered metrics in a tabular format.
Details
This debugging utility captures a snapshot of all metrics and formats them in an easy-to-read table showing names, descriptions, types, attributes, and current state values.
Example (Dumping metrics as text)
import { Console, Data, Effect, Metric } from "effect"
class DumpError extends Data.TaggedError("DumpError")<{
readonly operation: string
}> {}
const program = Effect.gen(function*() {
// Create and update some metrics for demonstration
const requestCounter = Metric.counter("http_requests_total", {
description: "Total HTTP requests"
})
const responseTime = Metric.gauge("response_time_ms", {
description: "Current response time in milliseconds"
})
const statusFreq = Metric.frequency("http_status_codes", {
description: "Frequency of HTTP status codes"
})
// Update metrics with some values
yield* Metric.update(requestCounter, 1)
yield* Metric.update(requestCounter, 1)
yield* Metric.update(responseTime, 125)
yield* Metric.update(statusFreq, "200")
yield* Metric.update(statusFreq, "404")
yield* Metric.update(statusFreq, "200")
// Get formatted dump of all metrics
const metricsReport = yield* Metric.dump
yield* Console.log("Current Metrics:")
yield* Console.log(metricsReport)
// Output will look like a formatted table:
// Name Description Type State
// http_requests_total Total HTTP requests Counter [count: 2]
// response_time_ms Current response time in milliseconds Gauge [value: 125]
// http_status_codes Frequency of HTTP status codes Frequency [occurrences: 200 -> 2, 404 -> 1]
return metricsReport
})export const const dump: Effect<string>const dump: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
Returns a human-readable string representation of all currently registered
metrics in a tabular format.
Details
This debugging utility captures a snapshot of all metrics and formats them
in an easy-to-read table showing names, descriptions, types, attributes,
and current state values.
Example (Dumping metrics as text)
import { Console, Data, Effect, Metric } from "effect"
class DumpError extends Data.TaggedError("DumpError")<{
readonly operation: string
}> {}
const program = Effect.gen(function*() {
// Create and update some metrics for demonstration
const requestCounter = Metric.counter("http_requests_total", {
description: "Total HTTP requests"
})
const responseTime = Metric.gauge("response_time_ms", {
description: "Current response time in milliseconds"
})
const statusFreq = Metric.frequency("http_status_codes", {
description: "Frequency of HTTP status codes"
})
// Update metrics with some values
yield* Metric.update(requestCounter, 1)
yield* Metric.update(requestCounter, 1)
yield* Metric.update(responseTime, 125)
yield* Metric.update(statusFreq, "200")
yield* Metric.update(statusFreq, "404")
yield* Metric.update(statusFreq, "200")
// Get formatted dump of all metrics
const metricsReport = yield* Metric.dump
yield* Console.log("Current Metrics:")
yield* Console.log(metricsReport)
// Output will look like a formatted table:
// Name Description Type State
// http_requests_total Total HTTP requests Counter [count: 2]
// response_time_ms Current response time in milliseconds Gauge [value: 125]
// http_status_codes Frequency of HTTP status codes Frequency [occurrences: 200 -> 2, 404 -> 1]
return metricsReport
})
dump: import EffectEffect<string> = import InternalEffectInternalEffect.const flatMap: {
<A, B, E2, R2>(
f: (a: A) => Effect.Effect<B, E2, R2>
): <E, R>(
self: Effect.Effect<A, E, R>
) => Effect.Effect<B, E | E2, R | R2>
<A, E, R, B, E2, R2>(
self: Effect.Effect<A, E, R>,
f: (a: A) => Effect.Effect<B, E2, R2>
): Effect.Effect<B, E | E2, R | R2>
}
flatMap(import InternalEffectInternalEffect.const context: <
R = never
>() => Effect.Effect<Context.Context<R>>
context(), (context: Context.Context<never>(parameter) context: {
mapUnsafe: ReadonlyMap<string, any>;
mutable: boolean;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
context) => {
const const metrics: readonly Metric.Snapshot[]metrics = const snapshotUnsafe: (
context: Context.Context<never>
) => ReadonlyArray<Metric.Snapshot>
Captures a snapshot of all registered metrics synchronously using the provided
service context.
When to use
Use to read metric snapshots from an explicit Context in low-level
integrations, exporters, or debugging tools that already have the context.
Details
This is the "unsafe" version that bypasses Effect's safety guarantees and requires
manual handling of the services context. Use the safe snapshot function for normal
application code.
Example (Capturing snapshots from a context)
import { Data, Effect, Metric } from "effect"
class UnsafeSnapshotError extends Data.TaggedError("UnsafeSnapshotError")<{
readonly operation: string
}> {}
// Use unsafeSnapshot in performance-critical scenarios or internal implementations
const performanceMetricsExporter = Effect.gen(function*() {
// Create some metrics first
const requestCounter = Metric.counter("http_requests", {
description: "Total HTTP requests"
})
const responseTime = Metric.gauge("response_time_ms", {
description: "Current response time"
})
// Update metrics
yield* Metric.update(requestCounter, 1)
yield* Metric.update(responseTime, 150)
// Get services context for unsafe operations
const services = yield* Effect.context()
// Use snapshotUnsafe for direct, synchronous access
const snapshots = Metric.snapshotUnsafe(services)
const exportBatchCreatedAt = 1_700_000_000_000
// Process snapshots immediately (useful for exporters, debugging tools)
const exportData = snapshots.map((snapshot) => ({
name: snapshot.id,
type: snapshot.type,
value: snapshot.state,
timestamp: exportBatchCreatedAt
}))
// This is synchronous and doesn't involve Effect overhead
// Useful for performance-critical metric export operations
return exportData
})
// For normal application use, prefer the safe snapshot function:
const safeSnapshotExample = Effect.gen(function*() {
// This automatically handles the services context
const snapshots = yield* Metric.snapshot
return snapshots
})
snapshotUnsafe(context: Context.Context<never>(parameter) context: {
mapUnsafe: ReadonlyMap<string, any>;
mutable: boolean;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
context)
if (const metrics: readonly Metric.Snapshot[]metrics.ReadonlyArray<T>.length: numberGets the length of the array. This is a number one higher than the highest element defined in an array.
length > 0) {
const const maxNameLength: numbermaxNameLength = const metrics: readonly Metric.Snapshot[]metrics.ReadonlyArray<Metric<in Input, out State>.Snapshot>.reduce<number>(callbackfn: (previousValue: number, currentValue: Metric<in Input, out State>.Snapshot, currentIndex: number, array: readonly Metric.Snapshot[]) => number, initialValue: number): number (+2 overloads)Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduce((max: numbermax, metric: Metric.Snapshotmetric) => {
const const length: numberlength = metric: Metric.Snapshotmetric.Metric.SnapshotProto<T extends Metric<in Input, out State>.Type, State>.id: stringid.String.length: numberReturns the length of a String object.
length
return const length: numberlength > max: numbermax ? const length: numberlength : max: numbermax
}, 0) + 2
const const maxDescriptionLength: numbermaxDescriptionLength = const metrics: readonly Metric.Snapshot[]metrics.ReadonlyArray<Metric<in Input, out State>.Snapshot>.reduce<number>(callbackfn: (previousValue: number, currentValue: Metric<in Input, out State>.Snapshot, currentIndex: number, array: readonly Metric.Snapshot[]) => number, initialValue: number): number (+2 overloads)Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduce((max: numbermax, metric: Metric.Snapshotmetric) => {
const const length: numberlength = import PredicatePredicate.function isNotUndefined<string | undefined>(input: string | undefined): input is stringChecks whether a value is not undefined.
When to use
Use when you need a Predicate refinement that filters out undefined
while preserving other falsy values.
Details
Returns a refinement that excludes undefined.
Example (Filtering undefined values)
import { Predicate } from "effect"
const values = [1, undefined, 2]
const defined = values.filter(Predicate.isNotUndefined)
console.log(defined)
isNotUndefined(metric: Metric.Snapshotmetric.Metric.SnapshotProto<T extends Metric<in Input, out State>.Type, State>.description: string | undefineddescription) ? metric: Metric.Snapshotmetric.Metric.SnapshotProto<T extends Metric<in Input, out State>.Type, State>.description: stringdescription.String.length: numberReturns the length of a String object.
length : 0
return const length: numberlength > max: numbermax ? const length: numberlength : max: numbermax
}, 0) + 2
const const maxTypeLength: numbermaxTypeLength = const metrics: readonly Metric.Snapshot[]metrics.ReadonlyArray<Metric<in Input, out State>.Snapshot>.reduce<number>(callbackfn: (previousValue: number, currentValue: Metric<in Input, out State>.Snapshot, currentIndex: number, array: readonly Metric.Snapshot[]) => number, initialValue: number): number (+2 overloads)Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduce((max: numbermax, metric: Metric.Snapshotmetric) => {
const const length: numberlength = metric: Metric.Snapshotmetric.Metric.SnapshotProto<T extends Metric<in Input, out State>.Type, State>.type: "Counter" | "Frequency" | "Gauge" | "Histogram" | "Summary"type.String.length: numberReturns the length of a String object.
length
return const length: numberlength > max: numbermax ? const length: numberlength : max: numbermax
}, 0) + 2
const const maxAttributesLength: numbermaxAttributesLength = const metrics: readonly Metric.Snapshot[]metrics.ReadonlyArray<Metric<in Input, out State>.Snapshot>.reduce<number>(callbackfn: (previousValue: number, currentValue: Metric<in Input, out State>.Snapshot, currentIndex: number, array: readonly Metric.Snapshot[]) => number, initialValue: number): number (+2 overloads)Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduce((max: numbermax, metric: Metric.Snapshotmetric) => {
const const length: numberlength = import PredicatePredicate.function isNotUndefined<Readonly<Record<string, string>> | undefined>(input: Readonly<Record<string, string>> | undefined): input is Readonly<Record<string, string>>Checks whether a value is not undefined.
When to use
Use when you need a Predicate refinement that filters out undefined
while preserving other falsy values.
Details
Returns a refinement that excludes undefined.
Example (Filtering undefined values)
import { Predicate } from "effect"
const values = [1, undefined, 2]
const defined = values.filter(Predicate.isNotUndefined)
console.log(defined)
isNotUndefined(metric: Metric.Snapshotmetric.Metric.SnapshotProto<T extends Metric<in Input, out State>.Type, State>.attributes: Readonly<Record<string, string>> | undefinedattributes) ? const attributesToString: (
attributes: Metric.AttributeSet
) => string
attributesToString(metric: Metric.Snapshotmetric.Metric.SnapshotProto<T extends Metric<in Input, out State>.Type, State>.attributes: Readonly<Record<string, string>>attributes).String.length: numberReturns the length of a String object.
length : 0
return const length: numberlength > max: numbermax ? const length: numberlength : max: numbermax
}, 0) + 2
const const grouped: [string, unknown][]grouped = var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.entries<unknown>(o: {
[s: string]: unknown;
} | ArrayLike<unknown>): [string, unknown][] (+1 overload)
Returns an array of key/values of the enumerable own properties of an object
entries(import ArrArr.groupBy(const metrics: readonly Metric.Snapshot[]metrics, (metric: anymetric) => metric: anymetric.id))
const const sorted: anysorted = import ArrArr.sortWith(const grouped: [string, unknown][]grouped, (entry: any(parameter) entry: {
0: string;
1: [Metric.Snapshot, ...Metric.Snapshot[]];
length: 2;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => string | [Metric.Snapshot, ...Metric.Snapshot[]] | undefined;
push: (...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => number;
concat: { (...items: Array<ConcatArray<string | [Metric.Snapshot, ...Metric.Snapshot[]]>>): Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>; (...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]] | ConcatArray<string | [Metric.S…;
join: (separator?: string) => string;
reverse: () => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
shift: () => string | [Metric.Snapshot, ...Metric.Snapshot[]] | undefined;
slice: (start?: number, end?: number) => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
sort: (compareFn?: ((a: string | [Metric.Snapshot, ...Metric.Snapshot[]], b: string | [Metric.Snapshot, ...Metric.Snapshot[]]) => number) | undefined) => [string, [Metric.Snapshot, ...Metric.Snapshot[]]];
splice: { (start: number, deleteCount?: number): Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>; (start: number, deleteCount: number, ...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>): Array<string | [Metric.Snapshot, ...…;
unshift: (...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => number;
indexOf: (searchElement: string | [Metric.Snapshot, ...Metric.Snapshot[]], fromIndex?: number) => number;
lastIndexOf: (searchElement: string | [Metric.Snapshot, ...Metric.Snapshot[]], fromIndex?: number) => number;
every: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): this is S[]; (predicate: (value: string | [Metric.Snapsho…;
some: (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => void, thisArg?: any) => void;
map: (callbackfn: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): Array<S>; (predicate: (value: string | [Metric.Snapshot, …;
reduce: { (callbackfn: (previousValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentIndex: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => strin…;
reduceRight: { (callbackfn: (previousValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentIndex: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => strin…;
find: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, obj: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): S | undefined; (predicate: (value: string | [Metric.Snapsho…;
findIndex: (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, obj: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => unknown, thisArg?: any) => number;
fill: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], start?: number, end?: number) => [string, [Metric.Snapshot, ...Metric.Snapshot[]]];
copyWithin: (target: number, start: number, end?: number) => [string, [Metric.Snapshot, ...Metric.Snapshot[]]];
entries: () => ArrayIterator<[number, string | [Metric.Snapshot, ...Metric.Snapshot[]]]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
includes: (searchElement: string | [Metric.Snapshot, ...Metric.Snapshot[]], fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => string | [Metric.Snapshot, ...Metric.Snapshot[]] | undefined;
findLast: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): S | undefined; (predicate: (value: string | [Metric.Snaps…;
findLastIndex: (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => unknown, thisArg?: any) => number;
toReversed: () => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
toSorted: (compareFn?: ((a: string | [Metric.Snapshot, ...Metric.Snapshot[]], b: string | [Metric.Snapshot, ...Metric.Snapshot[]]) => number) | undefined) => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>): Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>; (start: number, deleteCount?: number): Array<string | [Metric.Snapshot, ...…;
with: (index: number, value: string | [Metric.Snapshot, ...Metric.Snapshot[]]) => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
}
entry) => entry: any(parameter) entry: {
0: string;
1: [Metric.Snapshot, ...Metric.Snapshot[]];
length: 2;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => string | [Metric.Snapshot, ...Metric.Snapshot[]] | undefined;
push: (...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => number;
concat: { (...items: Array<ConcatArray<string | [Metric.Snapshot, ...Metric.Snapshot[]]>>): Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>; (...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]] | ConcatArray<string | [Metric.S…;
join: (separator?: string) => string;
reverse: () => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
shift: () => string | [Metric.Snapshot, ...Metric.Snapshot[]] | undefined;
slice: (start?: number, end?: number) => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
sort: (compareFn?: ((a: string | [Metric.Snapshot, ...Metric.Snapshot[]], b: string | [Metric.Snapshot, ...Metric.Snapshot[]]) => number) | undefined) => [string, [Metric.Snapshot, ...Metric.Snapshot[]]];
splice: { (start: number, deleteCount?: number): Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>; (start: number, deleteCount: number, ...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>): Array<string | [Metric.Snapshot, ...…;
unshift: (...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => number;
indexOf: (searchElement: string | [Metric.Snapshot, ...Metric.Snapshot[]], fromIndex?: number) => number;
lastIndexOf: (searchElement: string | [Metric.Snapshot, ...Metric.Snapshot[]], fromIndex?: number) => number;
every: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): this is S[]; (predicate: (value: string | [Metric.Snapsho…;
some: (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => void, thisArg?: any) => void;
map: (callbackfn: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): Array<S>; (predicate: (value: string | [Metric.Snapshot, …;
reduce: { (callbackfn: (previousValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentIndex: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => strin…;
reduceRight: { (callbackfn: (previousValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentValue: string | [Metric.Snapshot, ...Metric.Snapshot[]], currentIndex: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => strin…;
find: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, obj: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): S | undefined; (predicate: (value: string | [Metric.Snapsho…;
findIndex: (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, obj: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => unknown, thisArg?: any) => number;
fill: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], start?: number, end?: number) => [string, [Metric.Snapshot, ...Metric.Snapshot[]]];
copyWithin: (target: number, start: number, end?: number) => [string, [Metric.Snapshot, ...Metric.Snapshot[]]];
entries: () => ArrayIterator<[number, string | [Metric.Snapshot, ...Metric.Snapshot[]]]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
includes: (searchElement: string | [Metric.Snapshot, ...Metric.Snapshot[]], fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => string | [Metric.Snapshot, ...Metric.Snapshot[]] | undefined;
findLast: { (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => value is S, thisArg?: any): S | undefined; (predicate: (value: string | [Metric.Snaps…;
findLastIndex: (predicate: (value: string | [Metric.Snapshot, ...Metric.Snapshot[]], index: number, array: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>) => unknown, thisArg?: any) => number;
toReversed: () => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
toSorted: (compareFn?: ((a: string | [Metric.Snapshot, ...Metric.Snapshot[]], b: string | [Metric.Snapshot, ...Metric.Snapshot[]]) => number) | undefined) => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>): Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>; (start: number, deleteCount?: number): Array<string | [Metric.Snapshot, ...…;
with: (index: number, value: string | [Metric.Snapshot, ...Metric.Snapshot[]]) => Array<string | [Metric.Snapshot, ...Metric.Snapshot[]]>;
}
entry[0], import _String_String.const Order: order.Order<string>Provides an Order instance for comparing strings using lexicographic
ordering.
Example (Comparing strings lexicographically)
import { String } from "effect"
console.log(String.Order("apple", "banana")) // -1
console.log(String.Order("banana", "apple")) // 1
console.log(String.Order("apple", "apple")) // 0
Order)
const const rendered: anyrendered = const sorted: anysorted.map(([, group: any(parameter) group: {
0: Metric.Snapshot;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => Metric.Snapshot | undefined;
push: (...items: Array<Metric.Snapshot>) => number;
concat: { (...items: Array<ConcatArray<Metric.Snapshot>>): Array<Metric.Snapshot>; (...items: Array<Metric.Snapshot | ConcatArray<Metric.Snapshot>>): Array<Metric.Snapshot> };
join: (separator?: string) => string;
reverse: () => Array<Metric.Snapshot>;
shift: () => Metric.Snapshot | undefined;
slice: (start?: number, end?: number) => Array<Metric.Snapshot>;
sort: (compareFn?: ((a: Metric.Snapshot, b: Metric.Snapshot) => number) | undefined) => [Metric.Snapshot, ...Metric.Snapshot[]];
splice: { (start: number, deleteCount?: number): Array<Metric.Snapshot>; (start: number, deleteCount: number, ...items: Array<Metric.Snapshot>): Array<Metric.Snapshot> };
unshift: (...items: Array<Metric.Snapshot>) => number;
indexOf: (searchElement: Metric.Snapshot, fromIndex?: number) => number;
lastIndexOf: (searchElement: Metric.Snapshot, fromIndex?: number) => number;
every: { (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => value is S, thisArg?: any): this is S[]; (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any):…;
some: (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any): Ar…;
reduce: { (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Snapshot, currentIndex: number, array: Array<Metric.Snapshot>) => Metric.Snapshot): Metric.Snapshot; (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Sn…;
reduceRight: { (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Snapshot, currentIndex: number, array: Array<Metric.Snapshot>) => Metric.Snapshot): Metric.Snapshot; (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Sn…;
find: { (predicate: (value: Metric.Snapshot, index: number, obj: Array<Metric.Snapshot>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Metric.Snapshot, index: number, obj: Array<Metric.Snapshot>) => unknown, thisArg?: any): M…;
findIndex: (predicate: (value: Metric.Snapshot, index: number, obj: Array<Metric.Snapshot>) => unknown, thisArg?: any) => number;
fill: (value: Metric.Snapshot, start?: number, end?: number) => [Metric.Snapshot, ...Metric.Snapshot[]];
copyWithin: (target: number, start: number, end?: number) => [Metric.Snapshot, ...Metric.Snapshot[]];
entries: () => ArrayIterator<[number, Metric.Snapshot]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Metric.Snapshot>;
includes: (searchElement: Metric.Snapshot, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Metric.Snapshot | undefined;
findLast: { (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any…;
findLastIndex: (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Metric.Snapshot>;
toSorted: (compareFn?: ((a: Metric.Snapshot, b: Metric.Snapshot) => number) | undefined) => Array<Metric.Snapshot>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Metric.Snapshot>): Array<Metric.Snapshot>; (start: number, deleteCount?: number): Array<Metric.Snapshot> };
with: (index: number, value: Metric.Snapshot) => Array<Metric.Snapshot>;
}
group]) =>
group: any(parameter) group: {
0: Metric.Snapshot;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => Metric.Snapshot | undefined;
push: (...items: Array<Metric.Snapshot>) => number;
concat: { (...items: Array<ConcatArray<Metric.Snapshot>>): Array<Metric.Snapshot>; (...items: Array<Metric.Snapshot | ConcatArray<Metric.Snapshot>>): Array<Metric.Snapshot> };
join: (separator?: string) => string;
reverse: () => Array<Metric.Snapshot>;
shift: () => Metric.Snapshot | undefined;
slice: (start?: number, end?: number) => Array<Metric.Snapshot>;
sort: (compareFn?: ((a: Metric.Snapshot, b: Metric.Snapshot) => number) | undefined) => [Metric.Snapshot, ...Metric.Snapshot[]];
splice: { (start: number, deleteCount?: number): Array<Metric.Snapshot>; (start: number, deleteCount: number, ...items: Array<Metric.Snapshot>): Array<Metric.Snapshot> };
unshift: (...items: Array<Metric.Snapshot>) => number;
indexOf: (searchElement: Metric.Snapshot, fromIndex?: number) => number;
lastIndexOf: (searchElement: Metric.Snapshot, fromIndex?: number) => number;
every: { (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => value is S, thisArg?: any): this is S[]; (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any):…;
some: (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any): Ar…;
reduce: { (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Snapshot, currentIndex: number, array: Array<Metric.Snapshot>) => Metric.Snapshot): Metric.Snapshot; (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Sn…;
reduceRight: { (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Snapshot, currentIndex: number, array: Array<Metric.Snapshot>) => Metric.Snapshot): Metric.Snapshot; (callbackfn: (previousValue: Metric.Snapshot, currentValue: Metric.Sn…;
find: { (predicate: (value: Metric.Snapshot, index: number, obj: Array<Metric.Snapshot>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Metric.Snapshot, index: number, obj: Array<Metric.Snapshot>) => unknown, thisArg?: any): M…;
findIndex: (predicate: (value: Metric.Snapshot, index: number, obj: Array<Metric.Snapshot>) => unknown, thisArg?: any) => number;
fill: (value: Metric.Snapshot, start?: number, end?: number) => [Metric.Snapshot, ...Metric.Snapshot[]];
copyWithin: (target: number, start: number, end?: number) => [Metric.Snapshot, ...Metric.Snapshot[]];
entries: () => ArrayIterator<[number, Metric.Snapshot]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Metric.Snapshot>;
includes: (searchElement: Metric.Snapshot, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Metric.Snapshot | undefined;
findLast: { (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any…;
findLastIndex: (predicate: (value: Metric.Snapshot, index: number, array: Array<Metric.Snapshot>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Metric.Snapshot>;
toSorted: (compareFn?: ((a: Metric.Snapshot, b: Metric.Snapshot) => number) | undefined) => Array<Metric.Snapshot>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Metric.Snapshot>): Array<Metric.Snapshot>; (start: number, deleteCount?: number): Array<Metric.Snapshot> };
with: (index: number, value: Metric.Snapshot) => Array<Metric.Snapshot>;
}
group.map((metric: anymetric) =>
const renderName: (
metric: Metric.Snapshot,
padTo: number
) => string
renderName(metric: anymetric, const maxNameLength: numbermaxNameLength) +
const renderDescription: (
metric: Metric.Snapshot,
padTo: number
) => string
renderDescription(metric: anymetric, const maxDescriptionLength: numbermaxDescriptionLength) +
const renderType: (
metric: Metric.Snapshot,
padTo: number
) => string
renderType(metric: anymetric, const maxTypeLength: numbermaxTypeLength) +
const renderAttributes: (
metric: Metric.Snapshot,
padTo: number
) => string
renderAttributes(metric: anymetric, const maxAttributesLength: numbermaxAttributesLength) +
const renderState: (
metric: Metric.Snapshot
) => string
renderState(metric: anymetric)
).join("\n")
).join("\n")
return import InternalEffectInternalEffect.const succeed: <A>(
value: A
) => Effect.Effect<A>
succeed(const rendered: anyrendered)
}
return import InternalEffectInternalEffect.const succeed: <A>(
value: A
) => Effect.Effect<A>
succeed("")
})