{"_id":"@opentelemetry/sdk-metrics-base","_rev":"34-f1ac8fe98fe693b9952007777ef723be","name":"@opentelemetry/sdk-metrics-base","dist-tags":{"canary":"0.25.1-alpha.23","next":"0.28.0","latest":"0.31.0"},"versions":{"0.24.1-alpha.4":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.4","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"de884dfd51bc673d8aaa8304aca56f08ad575cf8","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.4.tgz","fileCount":165,"integrity":"sha512-X9JOlABaOS/gHqukIjPeupLpXxGcKRGZgN/U6W/8EAxhRzFlJBQEmRA4oph68I3jSGymPP4+KcBTAhGMUK6usw==","signatures":[{"sig":"MEUCIQCVSJua3MkPj9yyPLDIN9R8iWBQAjzg/mnDvmTK5KW7zAIgOQ8JoqlhCQySnTNOC1h/9JdrxqKcG2EM7nJGhNa5624=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDDvSCRA9TVsSAnZWagAAACcP/iyHhT4aPpr0SbCqfzX1\nl0nQUddlaCXHEwiXqn0tS8i2gARtnLz+cPqH0vGtDZeGNqFIq3X8Lfj33hbA\nJn8xBk6qXU2HFq7/J4WWu1Gh8zfNWmjEwlYSCseBRnPPzn4YuWIhQ6rgUuXc\nvQFDzt1NjHDhB22J5TdmenL1AxpLrmHwLw3eOxpzezMf3h+iIBkcb2ii9+Ca\nWN5Vq5Rh9a9gDMzugFD+jS7fN609NMTj75Yzu/hOhr/+Xpu+9dEg2BACSoyx\nbJDRklMNH96UgM/wsmTExXFr8sECQ6dPw1TSoBV8tlM0eUue0JHISbp3K1v+\nsvzThScg46H6LaZs8ErROaCEaK+waPpGIewFQiF8rPDXjpolfbc8Sd+yWSve\ndqS+cBwdjQIy7mOIBGwohBJJvrEfvmxBhjswOYrJwc4S4QOcToHoUxU7qkGd\n36r3eJde9s1tAenT9FeQIJXdLlhOEWjRDyc8guV9G7lZS1zUE1Z8jY0Q1hiw\nYlO9vg97szwGJnDURaergZdLqFJJSJCXtaOFQbVrI1sPWMSHPYsd+vkLOEfQ\ntUy6XLXFhtqlaRotwSKaUbwMWZp/aB9799SBu6koL2BzvHL/CJoiCkRZRXdl\n8Kl+m4+edDH839fqLA14mL4vKNqfEphAgv7+WM0/5mI69KhJl+nFl7H9eUbo\ntrRR\r\n=/Yis\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"a8d39317b5daad727f2116ca314db0d1420ec488","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.4+a8d39317","@opentelemetry/resources":"^0.24.1-alpha.4+a8d39317","@opentelemetry/api-metrics":"^0.24.1-alpha.4+a8d39317"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.6","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.4_1628191698318_0.9568560970867452","host":"s3://npm-registry-packages"}},"0.24.1-alpha.5":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.5","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"515da031e286a5412270b2a98746719416b72cd7","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.5.tgz","fileCount":165,"integrity":"sha512-qGxSL28r4TLy8qT5HpWaYA1Ek1rqY1JNGnIz07nkSMVhlpBRMCTGcVcwIn67VgpZ+n4SP8TXW6Gm6SyA8SjREQ==","signatures":[{"sig":"MEYCIQCeI2Lvzzttm+SS5K70kW7yO8hR00lHg8Eu8/VClykhmwIhAOW3NkoC+0h0lTObLopdOMEysCNYoCK21pv9cVIvF8Wa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDR2YCRA9TVsSAnZWagAAwh0P/3kfgyP8MD2+yA+125gL\n408CTcj0rNl5HsiHwauRX7ZE/PTZ8sJaxMPDouf21fyXQuToEp6/a5b86KSm\nRG72Nc7yrJHx5EKhybsQSyGLasHEuuDyKkEjaad/XNz0eF3wdP+Ucp9eHdEe\nuuUhQONanfVOqoR4T86KONZRulRbIA6FMrbpjZ4aSUrx7k14ONZvCnynPhts\nrlowgotooLmVGkFZjFXP2Tly7pXXIsTAl4le0BIWCZFJr/4jTbrolRKT6DIO\nfDDa3aDSZOtA6IxWZmA9fXxeiHvTLal7ie7N3VybLA+PXiy3aAEKTQpeuWAq\nZG8hvAPx8xMMKsN/CXKGbWV3CryBdXLHpAJYB57iuitOvnUiL5pr8ZdNGg64\nEHZlCOLK3WAmDToktEXTij6yIRRySwVqoKB3VnCwqDUSLPMCepvjrTDqC7sx\n+2kQGXqwfcZVMB0rPvDEFGMs0dJCjaEIDm4DULSBORKGwOy46RmkRhV+6gwQ\n7I4Y/Imivv90l/IIlRrF635SKXkInka2eOlnVzHqBABU2eZDNP+b2qcDkfqK\naL/XonUD7qUHIWnWCUpfIN5mIYjnsyjVd1eso4ht8e/yCC3fwdp4s/pC6U+0\nCni5o1+keclaFJyjdV2HkqZK9KN+PVfFK8DQxi5JhsBBqSY5yeec5K01V+Kl\n9k+D\r\n=S6BG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"b69ff35e90a33d20a0154dcd326f1467dfd39e2a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.5+b69ff35e","@opentelemetry/resources":"^0.24.1-alpha.5+b69ff35e","@opentelemetry/api-metrics":"^0.24.1-alpha.5+b69ff35e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.5_1628249496758_0.19739423892457464","host":"s3://npm-registry-packages"}},"0.24.1-alpha.6":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.6","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.6","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"846fd121c0c6a695ccffa5dbaeaec6c9f4eaad3d","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.6.tgz","fileCount":165,"integrity":"sha512-WnGCvJsXtj99IwMSjggRk1Lxi7c+yt7RSISetVYFsv43nkwoFOxRKRat00bhrlRLl/GzknmoOExYX+BOatdHUg==","signatures":[{"sig":"MEQCIFGjRynZSoSMuZ1j46NjmxIfb1pNaYEuyE21spLzwe9KAiBEsEYwcS9yzhrRHc2YNbE0j9qdRafzcpPoz4+ZrmBX1w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDTswCRA9TVsSAnZWagAAqq8P/A8CQEBlw25j0nA4r8Gq\nOWY9BE1NWoSKLykP49eUtLrqqvtqth5xm7sHZpTo+afPa3hEzO0+rBzY/RpQ\nhMVCb+7C/G4dnmIe5xsVb/70KKRnCG6sRuPm3onIukZcQiDiqi7UNVHJZ31P\nuV4ZgAGesdDxkr6xSJX8uRKhufx/H5qXW/mO/rQvMoNqxzdh8D4LxdjWBW5h\ntWz48wmzaxrt+RZisx7j7q9jdKUX4OTEmZ3XvXOhY/2vIvzTnbuhYPn8gd4d\ni+Sop4wXF/IQ97mAE7Qn4LuA2KIP/KmoUX+qphL/p1lobXtlrPOLXyV/85Wv\nXmroL7hS176UE3hWyW5MGm4wCHiW/4sMMtY6iVsGyYzMvMotAXzZbZtWmNrO\nFDQRfJ4huKCelvGdTHv0k2HaI+BRuabzTK5Yd+IFVAjQxDCqboqJrxIRikEc\nzhgveZkkwyW5lgqlfQP1RiR4ZZu3tRK3QWN+iyn6AiDn1pKI1wmiji7Yx6cH\nHq2skj8qM3kfdmE9xOxpHDG8ZEoPwZn9TK6Lrg2rLHG64sp+PQYi7cud9SBu\nD+rrEX1avhiM29nZ0Rx80CxbOjI4Tc55sWWouWiu+ye5xgK8O//cq+qviDZ8\nUS/Se2kExYQet80NkVo9b9O8jynUJwMTdcJfIrNs48Dt3P03+4PHO8W4BRMa\nuA7B\r\n=FNEo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"08828b4c6583a71ed42a341f16a18a41ed1307f5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.0","@opentelemetry/resources":"^0.24.0","@opentelemetry/api-metrics":"^0.24.1-alpha.6+08828b4c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.6_1628257072819_0.7837759739518944","host":"s3://npm-registry-packages"}},"0.24.1-alpha.7":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.7","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7903bd1906ae742576d673248af38e4491bedee1","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.7.tgz","fileCount":165,"integrity":"sha512-bCEHN9B+Gi/zCKSOym4vvIn74hHPmQ095C9ve63N/FL18bCpfQXErNY9rgLYLQ16xFhySJNG30uMzK0MDdVvGQ==","signatures":[{"sig":"MEYCIQC0VuKbkYMf6t1UXwgT0cgLkRrt11e15B9spXGjkTxApgIhALHRixZAGoo7ObnM1oQt054nVTSn1veZ07qa1V/pSOSs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDouNCRA9TVsSAnZWagAAEJwP/3+2cUJj33QvURkAE8Vm\nNRAtsRXqms109UP8mDwRkDhaA68Zq/9ac03YVIbv++ObBBABsJKeRen/w570\nSqn8xeFJ3pin+uFfaZz1h/cgYLXWgt89FMfkfvlcJDhRVKwKY1W0qKZbQXhZ\npyXzDZCDgZxXbiy6ZyIrQ1NaU6E70EJM5S9pN4M8Ou2yJFzAw+3zrrbaGrXx\nA6K+j60cqKtKxPIvugkwFsxBUUd0OOcDVtsmBIs34UkFjtzxF17Yoy7mxr8o\nGXxWd45VGxaQrOfZImTRnVVIPZrmKyGQqq4EUNYvI1L8RFRcs3e11eDUPmFL\n5wrqJ2O6E7s7bgv/2y8RnkC8JAh5SyjBdy0N7esMBEAgC7Gu88SjCjesCpI1\njfCfN3i2LWMMjRELBKcweeeMvYpX4KATemlIbjdB2DRqyN2ZJt8c1ZlbsgkS\n3AvrYCXJTl+Gw8hvv4bhZKS/97CCrhMfTBX7gqmd7PSBjiP/E8vBkqw4qTHl\nezCreCa9J1VV4AuWaT+IcMgP7Jb2/DE2ufJk25JHYYQq8uvBb55hQQS4nGjh\nhKE8IkfywFZDET0J3Mke+tKvgsDolDLZ8sNnaMGY5687jliVeBKB3DX3kmqj\niWFdiWjoD9kmXRtKkBZdhMpCpc0dFwTMAD5xMNHconj7hbIeoz/Di4/SIdlU\nULGT\r\n=qW2t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"365d502eaa0ba1f9799998f050d36073e943032e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.7+365d502e","@opentelemetry/resources":"^0.24.1-alpha.7+365d502e","@opentelemetry/api-metrics":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.7_1628343181201_0.38228236756333334","host":"s3://npm-registry-packages"}},"0.24.1-alpha.14":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.14","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d58c9942e0a72cc4e6179caa8f57f0e0b42dec95","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.14.tgz","fileCount":165,"integrity":"sha512-EBEpTqfXGioglC9oVqV6zn7H6br/PflHEeB9/d+VcXSMarv7e29yICVacfIJYEDt1z3bE+gymC/fAjzPrlDELg==","signatures":[{"sig":"MEQCICtY6mrkd49leZObulUciALa4Oqw+vtJWWAKmBWxtDWkAiAbJqQu4T5QrpAdt10XgVfBM2g9k0uQmqGBTip3qg2z3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+PMCRA9TVsSAnZWagAA4+EP/RGscCk7+cI+V5Vh8XL/\nMip95hCmhNzhgBreiGRpLcLhPwa7obyq2Q8dijG4xqI6X21GlkXJWssAFpoM\nroFFcxEif5eOareAUQqPwbAcQlSJzYoAH320dv0NbIeTDWyf8W/z07tvohcK\nHM8ZlutTtyDx7VXUcNra2Ayyrxjct5ZpWMmpuCN61iO0CNL47PNXKRuLkiO/\nTSq0A/81c2/EKmKIwBAvAqEjqKIpiKC3K0kh7T++hxjIg1u59602HOsegj8G\nn/NvsgzU8KHN6BPxhESSEZCKlBULT6bR8ZBnO+X3GZYkMHqUyFW1vwdt0egK\nAp7ypGju/zUFThOkjPh9avUPuTjQLrojQABdRU4WX0JzC0Pw/rsCJHDpLVIq\nt243gkpDFb9XP79uWbHRPkS+/ZKK/pNIBBXebIVXV8rCXt0UzjIU6xpYDVGq\ndUhufIhrB5R+GKuK9O9y55sE8VnWJkAIthPCWmUIxrvQjoL3vnDpQhcgq0Mp\nVF07UpaX9ZU/aM684ABpLDfQNusPABV6SuS5dzWNTjJp5B2FFDcHPE34Ztn1\n58xfzEOQFglpph02GiF+TgUhl92bKpF1GX4sRZT+rhravJf0kkpcAn5Y3L2s\n+mk5wfo4uG/F7fBL5IQSdBWYKpSJjo1bhGrzqt8Pn3iq/GvPBTr9BMFoRn6E\n3KpY\r\n=c3lx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"4553b29d4a04b5b7e4bf87cad64dc2fc8c740d8e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.14+4553b29d","@opentelemetry/resources":"^0.24.1-alpha.14+4553b29d","@opentelemetry/api-metrics":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.14_1628693452798_0.121281007300166","host":"s3://npm-registry-packages"}},"0.24.1-alpha.18":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.18","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1a7fdac41ae92657be64251e9e8aad4cb2f92503","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.18.tgz","fileCount":165,"integrity":"sha512-gfIqxgQSBFzgT9AIz8/uRghizIxfJckN+vmzhuUgqIl8Dhcuu08CAPhY8Bc0Qq8no9N7lxkqmQ0p053SpMeAtQ==","signatures":[{"sig":"MEUCIG+g6VqKHvrM6HumNZx5KaPeF78CG8cDPbjRD82HWJ8jAiEApbWUX2lGV4ET4oYeN3spi+pzM3rjo54MISfw1PdbQl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF3vJCRA9TVsSAnZWagAAJlgP/1kJmUq6i4RKVul7+LYj\nDeXuN3eWsU4XRvAH1/iEUuuYRBLOmHhyJJR3VdcHiAeV3w4QMVdHfibG4s/g\nUBgQx7+bYzQnmp7ai+w1E79Ek6Faj5ygxj3FTnKKdurBavwd6mtF7Jj88pCt\nSjoNR/k8Cn8/EKudY6Y51BGn22bBU5RiaNdic9UnZxjLQOkLOwsdZ3KUw6fY\nJDq6HkykE+pVjxvk3GIat1yGPGF+12vkmhB6iE5QQG95fNA5GvKD+TwoBDp2\nqqLtHX5s1+rc+qNVB4WUfHonuTWXyLgRl22/VR9YxU/XdvGpQLtm/nQJhpTV\nxh9iJJ4yeOn81fS+TnH34sUqoM6R8JFhBhEqWtcktQE4BZyR/NDrg/RW8ggn\nDe4Uu9y3v5P3OQutLf9kGhV4RP6/CPZ8ApG+xNIO9dtpxcPjdeJy9F1L9Xax\nGHmHNTq5GgA0L55Z6qvr7KMot6qb5pusCjRMlEUBxKdtD1/Vo3ti2peHUTl3\n+JQQ/m4PA14q+1QNVNi4cn5HwPEiLV8tC9M4L8WQS/69GXlzis0a2XlbRlg+\ng2lbK5S3D3ARnzZkqp/h+0dg56smK7RH+cD6FFl7VeIDEzkLKf8ynkQMdUh1\nz8IpxRr+CbDZcgsXi03Po/JkTbo4cUXIkiWqHP2Y776Daiewet6oK4tHzb1H\nBUxp\r\n=L/f3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"bdb12daeb2e4ca3761d1411125f5d883471709ce","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.0","@opentelemetry/resources":"^0.24.1-alpha.18+bdb12dae","@opentelemetry/api-metrics":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.18_1628928969517_0.6597754117700165","host":"s3://npm-registry-packages"}},"0.24.1-alpha.20":{"name":"@opentelemetry/sdk-metrics-base","version":"0.24.1-alpha.20","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.24.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bc34211784101e90abc3adc926dd3063c1385309","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.24.1-alpha.20.tgz","fileCount":165,"integrity":"sha512-BrXpIevrl4W1B2DyWHasfA3h18Xm2ZsAt8iO1xYTbAheUgX04f7Zm9rDkvIVO7GZgbfJ7RBS4wx+r6aDn+agBQ==","signatures":[{"sig":"MEQCIBlwhLFnZloTfYe8rty9go2ElO9CHnz6z157fmjE12LsAiAYeFzteJyzZ6H87DeF6Ph4YMgweDV4fWFl1REkwQQm4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHCT4CRA9TVsSAnZWagAAciMQAIHA5SrUS59rFzdOzOSW\n5BVf5ARQrh964CFD9mFt5lGrLxmTsHg3U0/thEAbsIvUHwno1F7BvXzzA8GZ\nicLRPe5frG5UczGhRJuHO7Ez4JT10P1iO8sj2AIHoL5zH1XLj2aZ60b2Ujhn\nSn5iszxy6k4yhDenR9SW6LoEbdLu2fa5KcehKIZd+x954hRfeC+UzzcRJV2X\nDqGFRcq+709yA3ZSXuAHOL9SRui2Rmp+zRhXyC/9Uohs0V5zIrzL+/84XwGi\nhDOc1hABS+nhfTXN2X1cWE+HWNdZBerzlAuHS5LJ0W499dR+7WkScFOKpkfO\nx+1ZWRBy++BnPI6P/j+3Hr0IOC7lcCnU+KzzA6dl8Th4A5zGhA1SHIUSO88b\nASGcHJksFXwZ1tb+4ku/2ZeXfOJscvDEFij+fGjy/WA8WeNiDcxSSGiVPYn0\nDmC8QI6QKPezDG1Q51xTQ67jtvmc801HQigYVCwQx7YPhyUti4nv1lySxOdO\nrJAvkTsOlnYAj/YQvHslHgktev07TArxOzuFCFSQchcTJlxHLM1/MOAMrcow\n5y0z2qIfE6XWXvXugPVhrrLILpqeTlWIpVLvebgrAQh37MCsGhG/LzZcVcTD\n6ikwCqlzbxMFklyixDnpfHGRW/glcg7N9qd/TkMASNk5b4eNXRYeflf6M3Po\n+sdJ\r\n=/T6Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"f12913899ff5c588e10830e5ba7183d9115c3442","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.20+f1291389","@opentelemetry/resources":"^0.24.1-alpha.20+f1291389","@opentelemetry/api-metrics":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.24.1-alpha.20_1629234423924_0.566618276102389","host":"s3://npm-registry-packages"}},"0.25.1-alpha.21":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.1-alpha.21","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c6db958ac181848c1d7e34d3d689755fdb3ce2f3","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.1-alpha.21.tgz","fileCount":165,"integrity":"sha512-6QrhVoHXu54PsQpOH9fFNWuskSlVqD6SDN9jxDuy+TJrHKMfVzBoRHIVi82lBQk9QPQbBGnOgy7vSGKXLffSIw==","signatures":[{"sig":"MEYCIQC4wwJB75XKbtuSRhvRAdj6Wb5cT4zJDbw4BK5QcbrgYAIhAJ9iIA2knHhBS0aEU4H4kIflOO7n537YrCl8OkL0V0XA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHWqoCRA9TVsSAnZWagAAecYP/iOlbmmBcqTXY80LipO1\n7OYS4+VgC4HwWhQ0WyeJ2RLxpbBzhlcB21xCGYZG80Co45Fxc1KyuyzHDqdW\nMO+taN7jfgKH0QWi+grCI4el9r5kltN4acq13nrDOiVcxrzICnAUPNPP01YL\nu+MDop/4pZQgpoch1ZQz+CEllY1elpjmseMzelSEOInfrYDBfeONebTM6vE2\n1py8Hm3xN3soxStIZK+fjMIRlJVhwNoOqxiWQ0nS2SiIl/qGlmxGpG0jdS8i\ntyQo0YW+iGvU2ezXvm2h2OcCHjfTHUVFsFQgUVKI9dqCGk9USz6o6MxPQ2g/\nnTjN1s/9njAgkgXD3Jja2BTXsIvUR4+JOjTwcmtQcWXbf+wvYjXSGBEAD0K4\n/VEpGeZItT1QKMyv44szxifx7fL8mMPAo5ELfldpvxOy2wo080SkXxBw0yBg\n/S+ibfbl8xFcRJ4B1WN5nc53SD/VZqryQBbk/tYCSJ3fLP2d+y3SmZad/WCk\n1VwvsYR6kk2AyVHJXNlIeELuiWe9z4qsTajKCuShWRXEjlOri2IWyYISyV6e\n8c5yM8LlAbqe+CXmO3gqps9CKM9ZBfAiOE8JwuCcMiatQxV8+HVHYSKmGM3D\n5Ct//EQiGN6V3oP+v03lfzS4IPP4mWSK2O98J3osv9csil66LMEA4Wf23LyL\nVXH0\r\n=WT6T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.21+0ef1fc28","@opentelemetry/resources":"^0.25.1-alpha.21+0ef1fc28","@opentelemetry/api-metrics":"^0.25.1-alpha.21+0ef1fc28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.1-alpha.21_1629317799792_0.7762928450270337","host":"s3://npm-registry-packages"}},"0.25.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3ac340ef9f1ff7c649339bb031f6c390a2c8ed70","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.0.tgz","fileCount":165,"integrity":"sha512-7fwPlAFB5Xw8mnVQfq0wqKNw3RXiAMad9T1bk5Sza9LK/L6hz8RTuHWCsFMsj+1OOSAaiPFuUMYrK1J75+2IAg==","signatures":[{"sig":"MEUCIGriCXMcyZfUlgAhblmy5quuXGCPNBWLJygLReJsxj9WAiEAlRU7MMcaoebZ3IGV9+DpZq13EH15mULjo2cK0NOkSzo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXi+CRA9TVsSAnZWagAAZQwP/iSH90Pb1AK78/wLpFKQ\n1I79Y5SQVSkdLgU83/vY9/49mV8tJ+1RSCw53VEi2CzwM7EXgBWZWpfkMZ3G\nngToVTkaY9CdgUnL8Hoih9VbZCt0KVKk+CNkhNSXK/zKuc0j2oTIEt0R3toR\nJK3smUfFxFDyVGGQDC1lioooi1Ff2EU+PfCHYeQ8wNm76m3eL+l/Z5YhoSSv\nErPG0PU6gzehnl558cXBLzcpI/T8xgXA75ZQD7auu6whde16Kf6opoFJd+8w\n/uYx9ouq3AU+eZP6Fmz/eOQ+9WKJH4cfZ8sFH6A3BliAFWhTjLsE0zdKhHEB\nxgGBZsIdzu0/JcbiwL123/iiwnSIxiDWjil4w5ulrzPkybPfBWv/9ZsHjVo9\nvWYa7OW60dw3EMrEmWTXMuDMhnunRX23d8isE9EKmsBopZnaqcdcXdNgCLB8\nX33/bHoyg8O0KMlwgx9DrFmt5IKqE+gan0Q8EUgm9iakX0RoYNGdp533B7/1\nWOlAOEe83K7clRZp32XCvN8PJEvScMc0uj9mA/umjgxRKXEGK8JwMzlenxHo\nt6Ngk/UcVwZrtmfR1oPN/00Bwctv1Mh3wlKB5VhAlE/KClT8ROrDgq6gtGHe\nNnPtabwL6rHmWHwAJ4Xpg1ZpCwLysBSVnCRRBqYEPwEPd3bjlGDr6TBEAu/0\n84Tr\r\n=7EVn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.8.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"0.25.0","@opentelemetry/resources":"0.25.0","@opentelemetry/api-metrics":"0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.0_1629321406715_0.09054150884201251","host":"s3://npm-registry-packages"}},"0.25.1-alpha.2":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.1-alpha.2","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d59fe066871f9100d9be86117b7aa4ff83eef567","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.1-alpha.2.tgz","fileCount":165,"integrity":"sha512-FpkrxtIk1NiuIvNPWz9x7P30WERFKHQ4febCmS7jY27bbfLPmzjbQTwomJ0AKbhADICnXX165nSU3gxk/cWxbA==","signatures":[{"sig":"MEYCIQD5C1UZjTGHGuFaKln8QO6CbwxjmKOP/7AW5Z1MCJyivgIhAM2C6m943puI3HWBTOWFmsSxHLjqC7IhxxBFe+fN+bV1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJBX0CRA9TVsSAnZWagAAu2QP/02xYeXmPhv1RVaBYTwQ\n94sOZU6JL3hGJiana0lr/qxC6ZUE6BVLLEGNsQYqyOqBUK4xIhbqvJEavdMG\n/9YWrppbQmtiizFgDwTY9VXEsfs3d6PJ78zxQKlpiOKqlgwf3foVDUUMaGna\neBsPE8hvuA1kiVoG1MpqPQkom/YvMAUnaiNzRuyo0rNKw7glK+vNShVHJfL/\nCBiJhmxrlVjp80IyEUVfs0d5IdK1PVfNvlhGbrYYOG9khWSC8O34/nVatlVY\n3JbuzMma9KQ9QavxweANox5tj9jvkGDCY2sJgkEK9G7eObnxRSfLC0H17sM7\nCSud+Vjokv916pwn4Gs4Rx5h+BpDuftOA5O9lGX6/mm2Y5H7vcUMWJlVeRd7\nVfpu1/rREcO9nXWimvONV3UhNHat3gT5RvdLPZOvRcoiSGV6KQfYgmNFip80\nv3mRwE5m1R6HG2Z6B5QatwPXNZKKFrdUkIHm+gapsOc7NZ6px0JUHCfHhlLP\nrTu1qsam7MQHo/+kYktL86uZjf4ctWi+z5KvzoGQnsPwhetOruC7I2u7gJZM\nRu66V8Sk9pLE9EMlliO2j22PZIiJe4ddv2/MF1fgc/BpLy1uHED6Upe7hMxN\nvxALS96yXrZTWBzvOK+t87u5zHXidVCcnGZnisswmFVrS1OE5yHXw8vHcxJt\nAFyP\r\n=TKx2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"78a78c093c2df24b66c47af4e037da9a6098fedb","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.2+78a78c09","@opentelemetry/resources":"^0.25.1-alpha.2+78a78c09","@opentelemetry/api-metrics":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.1-alpha.2_1629754868298_0.8712981705718512","host":"s3://npm-registry-packages"}},"0.25.1-alpha.4":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.1-alpha.4","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9f5f4e0a1c9922130a5c229467475fdcda6e8dce","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.1-alpha.4.tgz","fileCount":165,"integrity":"sha512-xKsaW04k8qa+mNpKfximUsjkEnIVzaFdm//RuPPZtEqesTplVHsMonbRuF1Qy2YDzqyTcDLwTBzCkmsVqEoUAA==","signatures":[{"sig":"MEUCIHnNvzUYw+a8hHDAA3eL27URS/J4FxUAEpO8JE/M5xIXAiEAhU8DwkoXbO0OkOaF/wDERaz6jTkP9DU7j/lImlnbZjE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJUl6CRA9TVsSAnZWagAA2b4QAI6E9+t3JK9QKgl71CQS\nEl527YQm2hl8xbgg+8NRfrtzgImCjxLGNPHIWQQ7L3SM60NC9JmTv8FOAHf8\nxSaQI/DCDdcDQVedH7iUhsXR+eWdiMfILdD37zYUhlICW8ITuaho9eYP6qvS\nXOidTFdSubPADyng8cWCAngjjTIRPAB7xAbA8yrb3TAVppPYi4GlrlvTWniB\nWl29GVfPoRrdu8q9C6B3L/EtyMx+siImKfgyOL0Bs/uuBmP6c/HFq4nb2s6I\nwOw8pXZ4K892tBDvgnNUsjNlgmzyxuk6kMqiz8fRckJQM7hN+ecWcz4WhNk0\nyCGQHfiRfZyi3kE3Bi5RdBf163KC4EYmMhs4qySXVFdLlPglBH3a9zx4rw66\nNoKhfO9yJmU5kL7d7Jmvx/N8X65ruP3gST5OVsahrFLZbVpxFSkNU3A/6DGx\n7hmpLWWNS9ntEsieHsD3c4K400TI+AKmU8h060COWNj7jqyC4JmY/EFjO4H5\nk+QIV/1r8+W4V0WKTdzkVU8gVWeVA4X8+Yos6FH4Nnm1M8oiy7Zc1NKgGzrM\nfwt1ZZIvE5bj2tVxF1fl0XfmsMJdUOyHJOKgmdsbuUZoGlnBQmdVUNrkxCKQ\nqQWvN0caUCAH+E3LO5MuufUwgYtxXs+8tD+a4qvbv1/JHDF4jHI96xK1Z0cv\nftox\r\n=0Q7V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"3cbd530f2ee5c06376210402eb87ec9e362853c5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.4+3cbd530f","@opentelemetry/resources":"^0.25.1-alpha.4+3cbd530f","@opentelemetry/api-metrics":"^0.25.1-alpha.4+3cbd530f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.1-alpha.4_1629833594809_0.07482048697408294","host":"s3://npm-registry-packages"}},"0.25.1-alpha.12":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.1-alpha.12","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9ccd2d54e70e12078e7ef1fd0c89d0be2b5849b0","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.1-alpha.12.tgz","fileCount":165,"integrity":"sha512-Df99HKWZeAu+U52b4TVJ3YcpO6oZS81yTOSTRtJ3lwanx9FUblKIcWMTTu5OJmZ+qgVWR/TgSAbb+Xpt6TMO2g==","signatures":[{"sig":"MEUCICEvxdB15wZkMKmnYMy6r9PgOP8Yfn71KdDMZN+mLuZdAiEA3poJeHZVK/XTJNovgZPLvkqWsEGN1tzp302qB/YxjnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLT3uCRA9TVsSAnZWagAA4vsQAJYUY76lruZok6jlQnPf\nBAk4Ock4t3uJxstanGiYSMQv2ad2aqPwuyAR71A+bYaT4b6lk/sGwUEJ+8ZJ\nnlz6EaoT4sGnAUx3bEBaJpb5CxcgW48JRnxb0iWkicIwdJdsNEnSx6m25OpH\ni4sLzGbJo2yQDjjDXPsnMIhAA9Mj+SjMHzPyOciwC0gc6bww335y85yxT3uY\nUgWvkAb0PDYLsHTDLGbDP9QsE3VBlwTw5pt0CmCOaHrG5+CQn6gvuHC74/rj\nkG8syVDQk2xiuV6PRYNo2LL5CG/67XxsRopSn7cleepv82x4H3+GfZ/+v8Y3\n20Dpy5uRyq1MctMqaipYkR3d3qX2POg9j83EhcF2sNNvwED+LGI38u+MRx1p\nS4ZwnmRQWIJCiZpzTWOrwWufZMNlMWLZyQaHkAeQHh2dqf8e+JuEKOZT7g9t\nG8m4SzeKSB7MUEg41dUqvBkJP0/Jxa7GLRo5vufyl0gmrCV+qq6wSFWo0Z7B\n63JcuiNB5CBTUYC1ph8w1ukG/tlo2m+2a5m5KX/pbZYgO4wix82rlNZeYz45\nrkZhzBlzMJ8cf6Y39pxX6LMKhqOxS9hTfTBNrMFCYMJtir0TApcrt2opVNB4\nd/FuhhOt5z/i4p8sgv7O8HI2H9KKo9HQJojrENTxpa7PXfymztjG0KR4P7QG\nFsVb\r\n=qZ00\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"7d2c4aaeb08e6c680f8b46cefcdfe955d7abe4b2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.12+7d2c4aae","@opentelemetry/resources":"^0.25.1-alpha.12+7d2c4aae","@opentelemetry/api-metrics":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.1-alpha.12_1630354926124_0.4028227516895224","host":"s3://npm-registry-packages"}},"0.25.1-alpha.13":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.1-alpha.13","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"aa18e21c498490da1c7e577c73a7fbb51edf7ea8","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.1-alpha.13.tgz","fileCount":165,"integrity":"sha512-Vi8T2cSTmnfSPT4RMyxqGluO5V7SUMevYwkqFaxgbZ2Hx8CwtjsSyHyInryQ2bYsSNWua1fmFdaQhycK/7O7NA==","signatures":[{"sig":"MEYCIQCwnBZroQGrs2GycGe6EcZGzLtfZAzlI0nr6/I71nbdWQIhAJ8e5zsBmGWkll/O7T45Q8u3kUo21Xh3nWPzEOMjB1g0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLUJ3CRA9TVsSAnZWagAAEicP/R2MW7TD89jEkn7S7db0\nEl66NN/K88GkZ0KHGlYdAYiZkuG1cw6uSjimr6XsM2pecP4H2gLWD6JFXCDJ\nGpWVb2fB0SNmDYbsPPebIVUVA+cC+aLL6kxo9haFw6jwAwZ2QvY2jd9FZTyK\nyXGyifPnL8iCKL8CtxmDSW2iqvpiUg52uElkzkXM6yVU+K6zfmJieyYijVBV\ng6tA7GBk1pnhaB21BPVeA6DCEpZFddRF7zZt/jjW5I7Ooma4Zmam3sJhVOiw\nEgRgpsjhX8h1LSs7jjzckfJciJPwMnbbz2OpV0TxJemK7Avna88tEaCLtV63\ntXIMERO7MAYqBeD4X3UHp1eN3EQS0nrpEStJ37ROVzEbNy9h7RKc2OXl02q7\nuwP5ilF5nftFGvRtIubGpVlRD31wSnvWqQrdjf93SGafixtVw3IGVf+DtqZe\nuIytYcHNi2gve06YaPE4VUrx0ogdtsJQmnbS9y13EMlmuOEbOVKnYoLhP7iJ\nWWrl0nOMfxsu9UxQlGX+q3mrHmnV4NEMAxGpMYCpYAO+BIC9ZO4gs4nAb9GR\ndhgUMaeOsut7Up1RA+rRIthpYUW6qDZeJfcaKqNcZS4vhBO1xRBVF+tpNJHg\nP/X2qm6bU91ZoEh+2RK2uLqQyTELTE7JSH0m79GY7taNhPLqA5FCcFpu9JyR\nliMD\r\n=8DgU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"f0caa22ffcb26af2a2f05260f138a494e120a955","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.13+f0caa22f","@opentelemetry/resources":"^0.25.1-alpha.13+f0caa22f","@opentelemetry/api-metrics":"^0.25.1-alpha.13+f0caa22f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.1-alpha.13_1630356087564_0.03459125576628641","host":"s3://npm-registry-packages"}},"0.25.1-alpha.23":{"name":"@opentelemetry/sdk-metrics-base","version":"0.25.1-alpha.23","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.25.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e931b95fd3baad614b129f648b15588ebd192fcc","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.1-alpha.23.tgz","fileCount":165,"integrity":"sha512-TAqieUX9CqrUscEULaSLzkWSIIrHKRgd/2y0DCQpAPG4PuRD2G7oemG4ExDz2DMfQsBNn8KGmTqQBOd82UocQg==","signatures":[{"sig":"MEUCIH9N0wZmrEc6COkMpztRGw1rGKzGyO8+NWbo8qFY7EiNAiEAxfPWw9srSMwXtsJzZrYmeM/K2j6jjGBREtofAJoGH7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOTXtCRA9TVsSAnZWagAA8vUQAJLtJR7rbKCyGDlNjVZv\n80XoOrJFHOaK2pMbvQz9i1TJ2O1EwiLrvpW5AxU5TJdgzcT4Gd42fqhZWgUo\ntzrGFWrH+WwqV2MdpTWRNoKWVF1+K+JT3y/+wMRazFZn6ooLTc7+JYvfFmbr\nriIMhffPzuP7Fcm2hLgtyoGAnGHfoTGl+lWoi28PtQ0kcP6QjPoi+50URbt1\nL94DlaG5SNDtKGaPmTu1MgjjaeATfGMKbq+MxD9r3K/qCXKYKLgDT7Bl9s1F\nL92ujh1QCcW+QEQ8o+xZ10NhxoyQPO27s3kEd2Gf2RCx2gXQglgAOJIk/sHm\nuoJn8QI1423SnqsOZkgHo7mefxBpaR/LZALnq7GS2cMApUjFHDHUuH2yzoWR\nkiyrIuk6g5yxg1QI2GKtVnZONlkr3mrcZJIqdxxSAtr6G1I900CT9cAcCRZO\ncbW7vW4yrMo+C3aAzauLvQLpgdBnuj26QZgGBlk/1qa1Z9WIsX7Qj6CIMmwi\nb/AY5YgX/xb2/Csv9TLFSkLRiNrD605iuOVKOP8OzxQFzshysEU2Pi2Z2xg8\nx26uf46MDKlbwwHQbQhWw3tCel7+WyxAMJlqXsperYXbZkpOcizrNHTVYpt9\nF1k/heM/4sVGrxz02x46su3BuqN/Eq5sBcWyf0PxSBXP+tYWCt/bOvwt5gdS\no3ZZ\r\n=yyVw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\n### Counter\n\nChoose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. It is restricted to non-negative increments.\nExample uses for Counter:\n\n- count the number of bytes received\n- count the number of requests completed\n- count the number of accounts created\n- count the number of checkpoints run\n- count the number of 5xx errors.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(10);\n\n```\n\n### UpDownCounter\n\n`UpDownCounter` is similar to `Counter` except that it supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request.\n\nExample uses for UpDownCounter:\n\n- count the number of active requests\n- count memory in use by instrumenting new and delete\n- count queue size by instrumenting enqueue and dequeue\n- count semaphore up and down operations\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// Initialize the Meter to capture measurements in various ways.\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\nconst counter = meter.createUpDownCounter('metric_name', {\n  description: 'Example of a UpDownCounter'\n});\n\nconst labels = { pid: process.pid };\n\n// Create a BoundInstrument associated with specified label values.\nconst boundCounter = counter.bind(labels);\nboundCounter.add(Math.random() > 0.5 ? 1 : -1);\n\n```\n\n### Value Observer\n\nChoose this kind of metric when only last value is important without worry about aggregation.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n\n// async callback - for operation that needs to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createValueObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n  observerResult.observe(getRandomValue(), { label: '2' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### UpDownSumObserver\n\nChoose this kind of metric when sum is important and you want to capture any value that starts at zero and rises or falls throughout the process lifetime.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback - for operation that needs to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of an async observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(()=> {\n      resolve(Math.random());\n    }, 100);\n  });\n}\n\n// sync callback in case you don't need to wait for value\nmeter.createUpDownSumObserver('your_metric_name', {\n  description: 'Example of a sync observer with callback',\n}, (observerResult) => {\n  observerResult.observe(getRandomValue(), { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n\n```\n\n### Sum Observer\n\nChoose this kind of metric when collecting a sum that never decreases.\nThe callback can be sync or async.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\nconst meter = new MeterProvider().getMeter('your-meter-name');\n\n// async callback in case you need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of an async sum observer with callback',\n}, async (observerResult) => {\n  const value = await getAsyncValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getAsyncValue() {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve(Math.random());\n    }, 100)\n  });\n}\n\n// sync callback in case you don't need to wait for values\nmeter.createSumObserver('example_metric', {\n  description: 'Example of a sync sum observer with callback',\n}, (observerResult) => {\n  const value = getRandomValue();\n  observerResult.observe(value, { label: '1' });\n});\n\nfunction getRandomValue() {\n  return Math.random();\n}\n```\n\n### Batch Observer\n\nChoose this kind of metric when you need to update multiple observers with the results of a single async calculation.\n\n```js\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\n\nconst exporter = new PrometheusExporter(\n  {\n    startServer: true,\n  },\n  () => {\n    console.log('prometheus scrape endpoint: http://localhost:9464/metrics');\n  },\n);\n\nconst meter = new MeterProvider({\n  exporter,\n  interval: 3000,\n}).getMeter('example-observer');\n\nconst cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {\n  description: 'CPU',\n});\n\nconst MemUsageMetric = meter.createValueObserver('mem_usage_per_app', {\n  description: 'Memory',\n});\n\nmeter.createBatchObserver((observerBatchResult) => {\n  getSomeAsyncMetrics().then(metrics => {\n    observerBatchResult.observe({ app: 'myApp' }, [\n      cpuUsageMetric.observation(metrics.value1),\n      MemUsageMetric.observation(metrics.value2)\n    ]);\n  });\n});\n\nfunction getSomeAsyncMetrics() {\n  return new Promise((resolve, reject) => {\n    setTimeout(() => {\n      resolve({\n        value1: Math.random(),\n        value2: Math.random(),\n      });\n    }, 100)\n  });\n}\n\n```\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/prometheus) for a short example.\n\n### Value Recorder\n\n`ValueRecorder` is a non-additive synchronous instrument useful for recording any non-additive number, positive or negative.\nValues captured by `ValueRecorder.record(value)` are treated as individual events belonging to a distribution that is being summarized.\n`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.0.0"},"gitHead":"feea5167c15c41f0aeedc60959e36c18315c7ede","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.17.6","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.23+feea5167","@opentelemetry/resources":"^0.25.1-alpha.23+feea5167","@opentelemetry/api-metrics":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.25.1-alpha.23_1631139309545_0.2504754983465245","host":"s3://npm-registry-packages"}},"0.26.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.26.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.26.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"efa0151e5c8a7f1932a5f38d3017d61f46ea505e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.26.0.tgz","fileCount":165,"integrity":"sha512-PbJsso7Vy/CLATAOyXbt/VP7ZQ2QYnvlq28lhOWaLPw8aqLogMBvidNGRrt7rF4/hfzLT6pMgpAAcit2C/nUMA==","signatures":[{"sig":"MEUCIQCZipTKOqpO8PcGYtkPjZ0wOVpDZWfWKifQv4E8nCXyAAIgDny52UznDzErxlv+CnGJWe+NTGDhuiSqTzsts+VT4YM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":397457},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"0f5a5bc906a2166c30a4344e460b7206c0b20bac","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.8.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.0.0","@opentelemetry/resources":"1.0.0","@opentelemetry/api-metrics":"0.26.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.26.0_1633455658815_0.7475719830499914","host":"s3://npm-registry-packages"}},"0.27.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.27.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.27.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cbd9189dd427d445c39aa3981fcc769891db1918","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.27.0.tgz","fileCount":153,"integrity":"sha512-HpiWI4sVNsjp3FGyUlc24KvUY2Whl4PQVwcbA/gWv2kHaLQrDJrWC+3rjUR+87Mrd0nsiqJ85xhGFU6IK8h7gg==","signatures":[{"sig":"MEUCIQC93lGh9kZ9bz/nrF+9Sn8EyYESJ+tXvOmIrAY3hUxNrwIgWgfFO1qOoQhpno0vXlarM4s8iunCdcN2CCM8YC17m2c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":371745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2UqQCRA9TVsSAnZWagAA9nIP/AttJyQLs5blPXKhK6OA\no5DfNf6i5pxQduxlOM0Vsy+Dr+Kd6zZKSV2xOKnHATV2EedpTi2++rRHMgnj\npPiPwSKpXYjoXzMnaMr+9Bs1OVVJbE0bgusJw/MMSEwIUON/1EuC0x5uHiti\nFEdU+/eHo+Am8Y47B2TJNFgRUKsl2qm/ieuhh9CUfUfTFBldHA3l26wxfEPw\nUk4ib6bNVvn3nz2KTd+ni/0d6qdhdtOkFjJqPm93Jj/E4BC+ow6306pe0qyU\nEWK89pSep64DLDmpTQQ1SnD6MnCBuL9DMpgRUX6Ol+9KG75XtTO40/8sH2lc\ngkXNwrduMSpg4omIr8lqVR91DLtMusd7LqbGIxiAHw8mIkJ2ScQgoQu7kdO8\nrPCBjVwpmLUNIpYQAxugkpQUI0OqOjXyBjoN7qkjWck36WcHpV1EKqgCPHYi\n3f0nRl1AnXK8e7HgPhr0omqJJZ3pdXcu+5iSpVIM1dHccfIKpGK8E/l5F6Mr\n2f8KhnXYv1a4JSv+1b97Mzb5QabTqyh/ObCfkPmxdODUhTLv2qVoadjeksVE\nAIgF7AKa+IduyNYIpvUt8HJt3HrUAWwbQ5sGdRdcR/R3Tuuyb1D4oIUZIDyf\ntMuPHUMAGRjxP3btrLXyWN/wd+J63Of52oWGS1zqboqEMYE2QpafckJtZl0K\nW72R\r\n=AYFg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f5e227f0cb829df1ca2dc220a3e0e8ae0e607405","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.0.1","@opentelemetry/resources":"1.0.1","@opentelemetry/api-metrics":"0.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.3","@types/lodash.merge":"4.6.6"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.27.0_1636643260581_0.23000936082907852","host":"s3://npm-registry-packages"}},"0.28.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.28.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.28.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8b317bbf45607594e749795ac56512ffd0d306b9","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.28.0.tgz","fileCount":462,"integrity":"sha512-PFjk9+WWU6Y51ZjxClnPW1rzTtcT79pR1FTiFjTsNmKSG0zU3qvUHAoTo0+jvvrO0Djihj7AE+iIG2xLWY4GNQ==","signatures":[{"sig":"MEUCIAqrk9kSdSIhPPmJXcrZ8UuwuKFePye1F4H/o2MVQ8gYAiEAlcPDfFAGznaMX2ph77XpV+UtizS+2h9hXdSEZNbHpjM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1130184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZp71ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfPQ//adXkHncJw6j+2mk+w5w57INNPfIImyIKG3HznR8JHDdIRP8o\r\nJ04EzpEyXEsdUdJW7/sBEemHKKQYxO+6N2IAw5+zNAsa4M2TbxSLqCy2IW3e\r\nxwoNndF/RWw9SzxTARnUZZ0+kJQA3oFRHJftpUuZ/SI5gE6nrsKocdnYF9OL\r\njVSCVFAiHxdTIyZD9MIEhnUSvLhFmdrxdrD6rtLrMAaDpGQInyMtUv+6PHPq\r\nrTingvSZ3XCM6G0Z5FMQ8StJ1TRGBQNMBLfSnb91YhE078Xmvt6ewyW2oaDn\r\nn0QqdBqMHOQv4IIKsxI0vRjRrg8s9asPLZmNS5ZC5jrG2fJDyxy2KyN1SXBm\r\nUjO/k+Pfirbi4p/6jkIsDzqJwj8b4KQ9QPgO3W8EUGgrhr0Lv8ayDqeC3/PH\r\n0P5sAF0qj/kFLcvETPDslRE3LjJyu+PjA56Or3mLgdSmJMrYe/MoCf5o2Ijq\r\nzfAVHr8FH1YCpsAS/DaPkGDzbSfDC3Dy3qUXRx7/ypCtNcGFBtDhDkIZXEPR\r\nd7RAJ+9BO9WtGah776DnOR1oZJ8t156Lq+d54vhW+tC2LyZ5jSMUnNo+dS49\r\nxA/wub6emq9veTy8sbSycDJjEmnKvYFDwJZdy/dax1oyqL0vDdhIAdd2AOLb\r\nbdt8Filrx6KJ/+hLxzYkGR501AjAGEpI6cU=\r\n=Lw1U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics allow a user to collect data and export it to a metrics backend like [Prometheus](https://prometheus.io/).\n\n## Work In Progress\n\nThe OpenTelemetry SDK in this directory is undergoing drastic changes. If you need to use metrics, we recommend you use [version `0.27.0`](https://github.com/open-telemetry/opentelemetry-js/tree/experimental/v0.27.0/experimental/packages/opentelemetry-sdk-metrics-base).\n\n## Installation\n\n```bash\nnpm install --save \"@opentelemetry/sdk-metrics-base@~0.27.0\"\n```\n\n## Usage\n\nPlease see the [version `0.27.0` README](https://github.com/open-telemetry/opentelemetry-js/tree/experimental/v0.27.0/experimental/packages/opentelemetry-sdk-metrics-base#usage).\n\nTODO: Add usage information for updated SDK\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","engines":{"node":">=8.12.0"},"gitHead":"28a177ffe3950c5602a91391af582a7a8c813c7d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.2.0","@opentelemetry/resources":"1.2.0","@opentelemetry/api-metrics":"0.28.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.28.0_1650892533412_0.40079143702178555","host":"s3://npm-registry-packages"}},"0.29.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.29.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.29.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"222c39a9767c7d36e72f2b9214b1c20067a8c024","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.29.0.tgz","fileCount":462,"integrity":"sha512-HOqHtyhrgdVdWYRbzyW9PZMvllcappl6pjYY78l4QqUVTbmum48kXXmhZGo3S6S0GOzxvwUX3meF0elm7poE/w==","signatures":[{"sig":"MEUCIHCtaVdA7bEt3yGP7H0G7x7fii/8d1KFJuxgcWMuOncUAiEAsnQMTh6s9d1xg/iHSeMP6bjklYjnfSWl9FVvBTbZCbE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1237312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikSlkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPlQ//elZUkgGVj3GdlZcp4DrPLFLleo/SJg4Cwwui1aNrOo+JYDex\r\nsZzFLuqCdYmeoEGeI2qtHo90YJ7GXo9tPsIPfFlMxtZ5IJWK3Rfg1P2BH46j\r\nHt/58IUG4+E/49Z5452G/uqvGBzzPbN9PZ6GwN03hGi++33uPSymg8fIKBW2\r\nPGlerjQPilIw0J267EW/F6gNEUSUN1qxh8M0lLVQPC7KnJxzrU2KCJDkCJrQ\r\n0fQjKqGxLMehQUOiL+4nPHx08E1rXWmog1RVg1w3RfBi876o8Ct4FSBRW0BY\r\nrYdTmKNB6O7gElIH3DlXMrijWz6EDBn4FgRg/h3PKwBmQubefHnBtNupa1p2\r\nvuBo73dMsesIGWUTGKp9wPyTzqP1vEFH0XHj5g/uI8VE/HRy7EkJ7ChbObcB\r\nqarSAKfmavHYfAh70WfwAm1iFSIVr7R9BPSDp0oh92M1HoVlZ3eGJFACGCLi\r\nsRs3q4e7/N8Jm8x120Wcq8rqEokceCbP15gxgFNmZt1k6pxF/f6Pqw8KXIJ5\r\nNWFEXh1/LXaC8YeRXpUx0YN50tml8O82tFjaiSoNDE6B5Lvn76xSOa6KCadE\r\n1/3lwr5DYfFWygPdXGDO//lpiG0gKiCo4l/CL7EwKDu3o9VSQFwWfwNADcxj\r\ncThVsep6TXrJVxQ3ooR+f3gww6s00uWkPQ4=\r\n=yCt3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.12.0"},"gitHead":"eda0b092db484855ded8b4837ba7fc19a377c5a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.3.0","@opentelemetry/resources":"1.3.0","@opentelemetry/api-metrics":"0.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.29.0_1653680484653_0.3010286412894634","host":"s3://npm-registry-packages"}},"0.29.1":{"name":"@opentelemetry/sdk-metrics-base","version":"0.29.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.29.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"023a5679b189d2c9ca5f8d011d0abc2734e74028","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.29.1.tgz","fileCount":462,"integrity":"sha512-o9gGrsGD8qrGAYJerKvVhtdWmJ7ghYCzF73gvEXLmdWa6vqDppDhj63fYL+S4AQtXWbzoB+UyUJE9kFZLctyHQ==","signatures":[{"sig":"MEUCIHhHHzf0a584ikTD1ocb6J3+a7jPCqC2ZptLUlZJ1Q3UAiEAjC+PVvOq0wN9ld1OGm+9Df29cCtwi45Mqaas5IIYXYI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1238620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil6wqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFuw/9FHPtKzXK6cSlNKPOrLDdTOHm53QVOuhMPO1GOYJlfyaz/ciQ\r\nGcCdEFijX/JNyhX3qKrjo7FulZe+qCFA1KYc+veJLV+iyoiyBVwPmNdnbZfx\r\nMyVgFmRtOSIImC9r3qoe7QCujzHOQDOkKCsL7Vpoa3J61P5oWZlapnIFMQW1\r\nrtDHacwqwr8Wcj8lcqymHCgudo2ebT/d3cjI0WNd9XClSpUNraKvcuh925qN\r\nKl7ZCYv07iKIUWVm9RZIIA3g5rVETwQKyHeiVquDLwa1o+rmSupqLnZH1WkG\r\ntCtKjvS3kctFi/oaXRcbXWqieI6nZLXm51WNAUJaQ1e07qtOkvat4cimUSj4\r\ny4a4ZmnIT349tR6GbIXa9yczr25W5zHyxu395G7tb+WhJJECjWocAT924Qrf\r\nl/+pxbkCuHO3HiKxd19T0aCOzXo1geyZQbzcggBwolJTaE9aWmhzjuzs7ADM\r\nSL6RaOeEEAOTWksDBtxaw24/qxEzqMZJghm1zIG/3BVwBt95bXmFJdlpnsJX\r\nRMEV9v4aITXZ9LMsWuP5MLiiyEmVJQfDY75ml4dn1cKt2s5vmq19bxvhGl5u\r\ndj4RXH3Uso5z4SiWsBMi6AND2hRKkyn4pSwdmnBCfRX0QqQ5xkaFAoDazBYe\r\nmen/kEpa5RhxKTTTXT5bLXMtL9fvcUwzNGQ=\r\n=dWDO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.12.0"},"gitHead":"094f016ac6697fc45ba5d7b5765f5c3e56f18d1e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.3.0","@opentelemetry/resources":"1.3.0","@opentelemetry/api-metrics":"0.29.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.29.1_1654107177868_0.8682059856641224","host":"s3://npm-registry-packages"}},"0.29.2":{"name":"@opentelemetry/sdk-metrics-base","version":"0.29.2","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.29.2","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bd515455f1d90e211458dcf957f0ae937772b155","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.29.2.tgz","fileCount":462,"integrity":"sha512-7hhhZ/6YRRgAXOUTeCsbe6SIk3wZAdAHnEwGGp7aiVH5AOyioHyHInw4EHtowlD6dbLxUWURjh6k+Geht2zbxg==","signatures":[{"sig":"MEYCIQCvxsppskm/onlpVs4nj6i6V47VhLJbBn15GY4zSVNanQIhAPvtjTMiNFwyhZvXgsh6WfvPbg3G1W0lgtyHYgMG/sMT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1238620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinmLqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+ixAAh7tXQ+ifdh38vxoRyKovywu+mDZd3g4PqUmtbauhplc9I8Jb\r\nk1HiOot0u7huKfedcWH/4/pF8gtmx6m/Q9wnJzFDyau2VABXpTd/H2+i+eX/\r\nFNCxK+uVtPuWx3/qXYQCiI03AP8747v3hPISjyvM2CW89S+OCaG8gjCTKsle\r\n1LnlHMes7U9nOK7vsV4brMThX1lqf3Bgz4YCd6JwMmH3lCfuGW1ZtXvjm8uu\r\n+JYmlcp1avXyFb+XgbEa/B9C6UxMadGs0Dm13/RRzSddeJLhRm0cLThBa648\r\ndpHOZ4sdzOMfsKXA3ruCSiCbpSjQzuKehD2h83hicoc4ufdheUjwbZDXUIoL\r\nUoviEP9IAXzS0PXGK67wAbKF+M3EyzXNNB0o/ARZrO3Fe2wIG9hDEUZVfG6u\r\n2TNEicBNyHsJ5VomKKjWc1bovEShTCW7FjMwtwHUqjGuQ74yrrzgU3dAG/Mq\r\nAT2fuAnvdelp/3MF6CvZVQtDtzpMpGRyBM7Pmv40GKzMMrbkV1Kah93eoCCc\r\ntN9V17/cGELTBGfGqhWlS4LSIVHfhjo0aLu5dP1gr08vMLlLWB6zZVO8ZMJt\r\n3L+RjAegVyMrEmAcyGQI5tNO/kjbZmi0EvSlo/Ud9eWi7fHAVmEreODN2cd0\r\nM7RjkcbUahktoWNCLTai9+7JPmYp6s3mhJo=\r\n=Lk3b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.12.0"},"gitHead":"51afd54bd63e46d5d530266761144c7be2f6b3a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.3.1","@opentelemetry/resources":"1.3.1","@opentelemetry/api-metrics":"0.29.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.29.2_1654547177937_0.04146229102457699","host":"s3://npm-registry-packages"}},"0.30.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.30.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.30.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"242d9260a89a1ac2bf1e167b3fda758f3883c769","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.30.0.tgz","fileCount":462,"integrity":"sha512-3BDg1MYDInDyGvy+bSH8OuCX5nsue7omH6Y2eidCGTTDYRPxDmq9tsRJxnTUepoMAvWX+1sTwZ4JqTFmc1z8Mw==","signatures":[{"sig":"MEUCIQDVurwnlAPrOdyI0gy+RVDTlfyCkKqD0Z2le6XjE8mGhQIgXh3MqBANkXFlaTsGFYXfSaq5BKIG3+4KX4cp/0gAC4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1281132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixe1qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo50hAAlXWrV3YlioN4lHsK8lzbSVPzPlONqh3/cNSZia0YuD/dN/S7\r\n0New/f6Rlwu58rcqOkqZmMfGTsQImDfUye5aY3psH6FxdGzKYyjdaSPE+Bia\r\nWDFGGO/TUZ6EhztEouUh34qaHV5L79z8TWzxXLP5tP/vYEcJQMFI7lIL2I1m\r\nTGovWH5Y3djD6c7H8arBVr8svXb3smbFY7l0K8QV388Q76uAhMsdik24a1V2\r\nGoXUP679j7R8zAIOUJcoo6hVFcTiQFnqJA5nkxZu2Hn8jZyka6HWklo0m55Y\r\nv/FK2s0WBcmdl/8enEpz6M/GE7A5BR4iHO/s/piz/Jcm1UYgRp3qMbaJcz1i\r\nEQvX+sjFntSeSx6ljkg0KYGOZKikKOy3zoQpxqhj7/em4mNj0nUn9Qe8rLdU\r\nqOa436yGIgmpHoYsEZEeROFU1HUNxtw2+MoTIxeWZJM771LG7tGOjbYb5Ue0\r\nqxFOW9JxEjL5T18zZfcRCkFFjDG1KsBp7Sn7H3S4PhwXqw/g/vJtrz9vhzXU\r\n8XlH//ua8OiC8dBni3wieWn1IiPCGKzs0bhYWoQKf2nH4CXofUejP6p1fuwr\r\nDNGQ2/pIJtaK4CVjJV48qb9pf/SGUR1sE7qRHL7BFTUbtYjJNc8SNjc50COi\r\n/XocIYOrLa/YlpSmn28meqB1vfAsGMSejic=\r\n=BwEI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"e39ab883b18636238ef0fd741df4ce5ed53e8d04","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.4.0","@opentelemetry/resources":"1.4.0","@opentelemetry/api-metrics":"0.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.30.0_1657138538057_0.30610775540384383","host":"s3://npm-registry-packages"}},"0.31.0":{"name":"@opentelemetry/sdk-metrics-base","version":"0.31.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics-base@0.31.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f797da702c8d9862a2fff55a1e7c70aa6845e535","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.31.0.tgz","fileCount":471,"integrity":"sha512-4R2Bjl3wlqIGcq4bCoI9/pD49ld+tEoM9n85UfFzr/aUe+2huY2jTPq/BP9SVB8d2Zfg7mGTIFeapcEvAdKK7g==","signatures":[{"sig":"MEUCIGp64aYgTL9fy4AAmvGb2QAvb3Dld37jcNnMJzj/K2PEAiEAuulURsfoUGGPFhLWkWPmP06Sx9h351f3XzNCUjhp9AE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1355300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4FQAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBEw//db+UbVQTN8JjrO85vWVQfhopCMwEp9WDYjiHI9aznXzRLliC\r\nshOrk1R//uobB4GzW8jmLyJ4hIawCu2yDYSG1d2OP0+v8xkVNbNtSU214WCI\r\nr8+xNbRXN/4vo2y4TG4xXqsUdEMlMILuU8L6nbkAa1+OJ48ByCcNM3ylbASQ\r\n8Q7+fq+m9colX49/fmJ8DsG38jVTZiWyRraD5AFvjVtZMT9KtLizAbaDt+1U\r\nV+d/74jc7BJgvnkgj4NW+cf96zG0eQTZJBzGj7phHZZzB8uNysQ+0pA+evkH\r\naWF9ZNN73+IXvSe/ZYqsRfCwyiK35gXobhh4PWwq6e+RimdP/Pc6LCEU7UwP\r\nVSojjw0C3n+hPagx66jKnM67SHW1xb9N6W/8GL8HC8ql8xd5CWw4HyBw/ZTw\r\nWWmZZzIG5V8vQIno2Ss6IoVImu5vCpOpxq5l7Y9v3gdMZZ0Y+NbAM73szUx2\r\nILh+Yy9FJ0cDuATiIXnqy/Xv8dlm3wfowTuReSrBuRt+p3GLvhd0xWVXGXBI\r\nvWY05YIZhATdpCsGeZ1KSYSdyOWtZ+rUd3B/0gOyYtK5SjBMR50vEB36yoy3\r\nbmZL6e9fRGzvCnRrWBI9muJtWl6nj3GheCC75tLH0BnMdHsuN53vCPan7Vc/\r\nY8k99P0X5mdi2F8WY8jQL3Eqo8JveTlUKCI=\r\n=EjMJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"776656b6e0cd0fc49a52b734702bc77110e483f1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Please use @opentelemetry/sdk-metrics","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.5.0","@opentelemetry/resources":"1.5.0","@opentelemetry/api-metrics":"0.31.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics-base_0.31.0_1658868735902_0.7247382874390513","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-08-05T19:28:18.233Z","modified":"2026-05-01T17:15:58.026Z","0.24.1-alpha.4":"2021-08-05T19:28:18.457Z","0.24.1-alpha.5":"2021-08-06T11:31:36.903Z","0.24.1-alpha.6":"2021-08-06T13:37:52.980Z","0.24.1-alpha.7":"2021-08-07T13:33:01.343Z","0.24.1-alpha.14":"2021-08-11T14:50:52.963Z","0.24.1-alpha.18":"2021-08-14T08:16:09.717Z","0.24.1-alpha.20":"2021-08-17T21:07:04.073Z","0.25.1-alpha.21":"2021-08-18T20:16:40.012Z","0.25.0":"2021-08-18T21:16:46.881Z","0.25.1-alpha.2":"2021-08-23T21:41:08.445Z","0.25.1-alpha.4":"2021-08-24T19:33:14.971Z","0.25.1-alpha.12":"2021-08-30T20:22:06.357Z","0.25.1-alpha.13":"2021-08-30T20:41:27.749Z","0.25.1-alpha.23":"2021-09-08T22:15:09.753Z","0.26.0":"2021-10-05T17:40:58.956Z","0.27.0":"2021-11-11T15:07:40.770Z","0.28.0":"2022-04-25T13:15:33.622Z","0.29.0":"2022-05-27T19:41:24.825Z","0.29.1":"2022-06-01T18:12:58.127Z","0.29.2":"2022-06-06T20:26:18.059Z","0.30.0":"2022-07-06T20:15:38.327Z","0.31.0":"2022-07-26T20:52:16.154Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics-base","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"description":"Work in progress OpenTelemetry metrics SDK","maintainers":[{"email":"dyladan@gmail.com","name":"dyladan"},{"email":"marc.pichler@dynatrace.com","name":"pichlermarc"},{"email":"overbalancedev@proton.me","name":"overbalance"},{"email":"npmjs-account@opentelemetry.io","name":"npmjs-account"},{"email":"trentm@gmail.com","name":"trentm"},{"email":"martin@martinkuba.com","name":"martinkuba"}],"readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nOpenTelemetry metrics module contains the foundation for all metrics SDKs of [opentelemetry-js](https://github.com/open-telemetry/opentelemetry-js).\n\nUsed standalone, this module provides methods for manual instrumentation of code, offering full control over recording metrics for client-side JavaScript (browser) and Node.js.\n\nIt does **not** provide automated instrumentation of known libraries or host environment metrics out-of-the-box.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/api-metrics\nnpm install --save @opentelemetry/sdk-metrics-base\n```\n\n## Usage\n\nThe basic setup of the SDK can be seen as followings:\n\n```js\nconst opentelemetry = require('@opentelemetry/api-metrics');\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics-base');\n\n// To create an instrument, you first need to initialize the Meter provider.\n// NOTE: The default OpenTelemetry meter provider does not record any metric instruments.\n//       Registering a working meter provider allows the API methods to record instruments.\nopentelemetry.setGlobalMeterProvider(new MeterProvider());\n\n// To record a metric event, we used the global singleton meter to create an instrument.\nconst counter = opentelemetry.getMeter('default').createCounter('foo');\n\n// record a metric event.\ncounter.add(1, { attributeKey: 'attribute-value' });\n```\n\nIn conditions, we may need to setup an async instrument to observe costly events:\n\n```js\n// Creating an async instrument, similar to synchronous instruments\nconst observableCounter = opentelemetry.getMeter('default')\n  .createObservableCounter('observable-counter');\n\n// Register a single-instrument callback to the async instrument.\nobservableCounter.addCallback(async (observableResult) => {\n  // ... do async stuff\n  observableResult.observe(1, { attributeKey: 'attribute-value' });\n});\n\n// Register a multi-instrument callback and associate it with a set of async instruments.\nopentelemetry.getMeter('default')\n  .addBatchObservableCallback(batchObservableCallback, [ observableCounter ]);\nasync function batchObservableCallback(batchObservableResult) {\n  // ... do async stuff\n  batchObservableResult.observe(observableCounter, 1, { attributeKey: 'attribute-value' });\n}\n```\n\nViews can be registered when instantiating a `MeterProvider`:\n\n```js\nconst meterProvider = new MeterProvider({\n  views: [\n    // override the bucket boundaries on `my.histogram` to [0, 50, 100]\n    new View({ aggregation: new ExplicitBucketHistogramAggregation([0, 50, 100]), instrumentName: 'my.histogram'}),\n    // rename 'my.counter' to 'my.renamed.counter'\n    new View({ name: 'my.renamed.counter', instrumentName: 'my.counter'})\n  ]\n})\n```\n\n## Example\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/examples/prometheus) for an end-to-end example, including exporting metrics.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg\n","readmeFilename":"README.md"}