Collect metric value from a function.
Atelemetry
plugin.
Click to expand
Yet to document.
const telemetry = require('@telemetry-js/telemetry')()
const fn = require('@telemetry-js/collector-function')
const rand = fn.sync('myapp.random.count', { unit: 'count' }, Math.random)
telemetry.task()
.collect(rand)
Yet to document.
With npm do:
npm install @telemetry-js/collector-function
This project is kindly sponsored by Reason Cybersecurity Ltd.
MIT © Vincent Weevers