prom-client#GaugeConfiguration TypeScript Examples
The following examples show how to use
prom-client#GaugeConfiguration.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Gauge.ts From Asena with MIT License | 5 votes |
constructor(configuration: Omit<GaugeConfiguration<string>, 'registers'>){
super(Object.assign(configuration, {
registers: [registry]
}))
}
Example #2
Source File: metrics.ts From backstage with Apache License 2.0 | 5 votes |
export function createGaugeMetric<T extends string>(
config: GaugeConfiguration<T>,
): Gauge<T> {
const existing = register.getSingleMetric(config.name) as Gauge<T>;
return existing || new Gauge<T>(config);
}