Allows you to create prometheus metrics easily using dependency injection mechanism
import { counter, Counter } from '@biorate/prometheus';
class Test {
@counter({
name: 'test_counter',
help: 'Test counter',
labelNames: ['label1', 'label2'],
})
protected counter: Counter;
public metric() {
this.counter.labels({ label1: 1, label2: 2 }).inc();
}
}
const test = new Test();
test.metric();
- Documentation can be found here - docs.
See the CHANGELOG
Copyright (c) 2021-present Leonid Levkin (llevkin)