Summary
A summary samples observations
class Summary<T extends string = string> {}
constructor(configuration: SummaryConfiguration<T>);
get(): Promise<MetricObjectWithValues<MetricValueWithName<T>>>;
observe(value: number): void;
observe(labels: LabelValues<T>, value: number): void;
remove(...values: string[]): void;
remove(labels: LabelValues<T>): void;
reset(): void;
startTimer(labels?: LabelValues<T>): (labels?: LabelValues<T>) => number;
§Constructors
§
new Summary(configuration: SummaryConfiguration<T>)
[src]@param configuration
Configuration when creating Summary metric. Name and Help is mandatory
§Methods
§
labels(...values: string[]): Summary.Internal<T>
[src]Return the child for given labels
@param values
Label values
@return
Configured summary with given labels
labels(labels: LabelValues<T>): Summary.Internal<T>
[src]Return the child for given labels
@param labels
Object with label keys and values
@return
Configured counter with given labels
§
observe(value: number): void
[src]Observe value in summary
@param value
The value to observe
observe(labels: LabelValues<T>, value: number): void
[src]Observe value for given labels
@param labels
Object with label keys and values
@param value
Value to observe