Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/live/observability/client.ts>Registry

deco is the edge-native site editor and app framework for building dynamic, high-performance sites with a built-in visual admin UI.
Go to Latest
class Registry
import { Registry } from "https://deno.land/x/live@1.36.6/observability/client.ts";

Container for all registered metrics

Properties

contentType: string

Gets the Content-Type of the metrics for use in the response headers.

Methods

clear(): void

Remove all metrics from the registry

getMetricsAsArray(): MetricObject[]

Get all metrics as objects

getMetricsAsJSON(): Promise<MetricObjectWithValues<MetricValue<string>>[]>

Get all metrics as objects

getSingleMetric<T extends string>(name: string): Metric<T> | undefined

Get a single metric

getSingleMetricAsString(name: string): Promise<string>

Get a string representation of a single metric by name

metrics(): Promise<string>

Get string representation for all metrics

registerMetric<T extends string>(metric: Metric<T>): void

Register metric to register

removeSingleMetric(name: string): void

Remove a single metric

resetMetrics(): void

Reset all metrics in the registry

setDefaultLabels(labels: Object): void

Set static labels to every metric emitted by this registry

Static Methods

merge(registers: Registry[]): Registry

Merge registers