JSPM

@telemetry-js/collector-function

0.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q30262F
  • License MIT

Collect metric value from a function

Package Exports

  • @telemetry-js/collector-function

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@telemetry-js/collector-function) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

collector-function

Collect metric value from a function.
A telemetry plugin.

npm status node Test JavaScript Style Guide

Table of Contents

Click to expand

Usage

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)

API

Yet to document.

Install

With npm do:

npm install @telemetry-js/collector-function

Acknowledgements

This project is kindly sponsored by Reason Cybersecurity Ltd.

reason logo

License

MIT © Vincent Weevers