Registry
Container for all registered metrics
class Registry { }
contentType: string;
clear(): void;
getMetricsAsArray(): MetricObject[];
getMetricsAsJSON(): Promise<MetricObjectWithValues<MetricValue<string>>[]>;
getSingleMetricAsString(name: string): Promise<string>;
metrics(): Promise<string>;
removeSingleMetric(name: string): void;
resetMetrics(): void;
setDefaultLabels(labels: Object): void;
§Properties
§Methods
§
getMetricsAsJSON(): Promise<MetricObjectWithValues<MetricValue<string>>[]>
[src]Get all metrics as objects
§
getSingleMetricAsString(name: string): Promise<string>
[src]Get a string representation of a single metric by name
@param name
The name of the metric
§
removeSingleMetric(name: string): void
[src]Remove a single metric
@param name
The name of the metric to remove
§
setDefaultLabels(labels: Object): void
[src]Set static labels to every metric emitted by this registry
@param labels
of name/value pairs: { defaultLabel: "value", anotherLabel: "value 2" }