Licence
ISC
Version
1.7.2
Deps
2
Size
20 kB
Vulns
0
Weekly
0
Metrics
Collect metrics with simple and concise API.
Uses Mesh IoC.
Usage
Use counters, gauges and histograms to collect metrics in your application.
export class MyService { @metric() counter = new CounterMetric('my_service_counter_total', 'Total number of times something important happened.'); doSomething() { // ... counter.incr(); } }Generate a Prometheus report from all metrics defined in your mesh:
const report = generateMetricsReport(mesh);