{"_id":"@bradborgald/instrumentation-runtime-node","_rev":"1-2e0cc6d961afa276d5bfc327cf1fed7a","name":"@bradborgald/instrumentation-runtime-node","dist-tags":{"latest":"0.7.0"},"versions":{"0.7.1-test":{"name":"@bradborgald/instrumentation-runtime-node","version":"0.7.1-test","keywords":["opentelemetry","nodejs","profiling","metrics","stats","plugins"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@bradborgald/instrumentation-runtime-node@0.7.1-test","maintainers":[{"name":"bradborgald","email":"bradborgald@cyberqp.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"d76fccd83e76d266ce71a0a4abda0ceb6966f547","tarball":"https://registry.npmjs.org/@bradborgald/instrumentation-runtime-node/-/instrumentation-runtime-node-0.7.1-test.tgz","fileCount":1348,"integrity":"sha512-vZD4dfTlA8d6+sp6N2mK3qT3KipU7gPRNZRcYQ2EJjLoz/n8WUnTBx9H7bZ3FxygUbzeZ9foc06e8IVt2MN+2w==","signatures":[{"sig":"MEQCIHAXryK4kS24erUy/0Z0qKMauhXIN1RLJs+qCkVFpxYfAiAoFHbsN8YmdXY6O29rxZbpWFAOEFdqEnHiDwPZ/aPUCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24192498},"main":"build/src/index.js","types":"build/src/index.d.ts","gitHead":"46b67752b001d428a1f5c315ca287300e9444dc7","scripts":{"bump":"lerna publish","lint":"lerna run lint","test":"lerna run test","clean":"lerna run clean","compile":"lerna run compile","lint:fix":"lerna run lint:fix","prewatch":"npm run precompile","changelog":"lerna-changelog","precompile":"tsc --version && npm run version:update","test:browser":"lerna run test:browser --concurrency 1","lint:examples":"eslint ./examples/**/*.js","version:update":"lerna run version:update","test:ci:changed":"lerna run test --since origin/main","lint:examples:fix":"eslint ./examples/**/*.js --fix","test-all-versions":"npm run --if-present --workspaces test-all-versions"},"_npmUser":{"name":"bradborgald","email":"bradborgald@cyberqp.com"},"changelog":{"labels":{"bug":":bug: Bug Fix","breaking":":boom: Breaking Change","internal":":house: Internal","enhancement":":rocket: Enhancement","documentation":":memo: Documentation","plugin-request":":tada: New Plugins"},"ignoreCommitters":["renovate-bot","dependabot"]},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git"},"workspaces":["packages/*","plugins/node/*","plugins/web/*","propagators/*","detectors/node/*","metapackages/*"],"_npmVersion":"10.7.0","description":"This is a repository for OpenTelemetry JavaScript contributions.","directories":{"example":"examples"},"_nodeVersion":"18.20.4","dependencies":{"he":"^1.2.0","ms":"^2.1.2","yn":"^2.0.0","nyc":"^15.1.0","gopd":"^1.0.1","once":"^1.4.0","uuid":"^8.3.2","acorn":"^8.11.3","archy":"^1.0.0","chalk":"^2.4.2","debug":"^4.3.4","growl":"^1.10.5","hasha":"^5.2.2","isexe":"^2.0.0","jsesc":"^2.5.2","json5":"^2.2.3","p-try":"^2.2.0","which":"^2.0.2","arrify":"^1.0.1","braces":"^3.0.2","hasown":"^2.0.1","lodash":"^4.17.21","rimraf":"^5.0.5","wrappy":"^1.0.2","esprima":"^4.0.1","gensync":"^1.0.0-beta.2","globals":"^11.12.0","is-glob":"^4.0.3","pkg-dir":"^4.2.0","resolve":"^1.22.8","shimmer":"^1.2.1","ts-node":"^7.0.1","yallist":"^3.1.1","anymatch":"^3.1.3","escalade":"^3.1.2","for-each":"^0.3.3","has-flag":"^4.0.0","inflight":"^1.0.6","inherits":"^2.0.4","is-regex":"^1.1.4","make-dir":"^3.1.0","minimist":"^1.2.8","minipass":"^7.0.4","path-key":"^3.1.1","ts-mocha":"^10.0.0","call-bind":"^1.0.7","camelcase":"^5.3.1","commondir":"^1.0.1","es-errors":"^1.3.0","es6-error":"^4.1.1","has-proto":"^1.0.3","is-bigint":"^1.0.4","is-number":"^7.0.0","is-stream":"^2.0.1","is-string":"^1.0.7","is-symbol":"^1.0.4","jackspeak":"^2.3.6","js-tokens":"^4.0.0","lru-cache":"^5.1.1","picomatch":"^2.3.1","strip-bom":"^4.0.0","wrap-ansi":"^6.2.0","ansi-regex":"^4.1.1","color-name":"^1.1.3","concat-map":"^0.0.1","decamelize":"^1.2.0","fill-range":"^7.0.1","globalthis":"^1.0.3","is-extglob":"^2.1.1","is-weakref":"^1.0.2","is-windows":"^1.0.2","make-error":"^1.3.6","path-parse":"^1.0.7","picocolors":"^1.0.0","source-map":"^0.6.1","spawn-wrap":"^2.0.0","strip-ansi":"^6.0.1","wide-align":"^1.1.3","ansi-colors":"^3.2.3","ansi-styles":"^3.2.1","buffer-from":"^1.1.2","clean-stack":"^2.2.0","cross-spawn":"^7.0.3","emoji-regex":"^8.0.0","es-abstract":"^1.22.4","fromentries":"^1.3.2","fs.realpath":"^1.0.0","graceful-fs":"^4.2.11","has-bigints":"^1.0.2","has-symbols":"^1.0.3","imurmurhash":"^0.1.4","is-callable":"^1.2.7","log-symbols":"^3.0.0","object-keys":"^1.1.1","path-exists":"^4.0.0","path-scurry":"^1.10.1","signal-exit":"^3.0.7","browserslist":"^4.23.0","caniuse-lite":"^1.0.30001589","html-escaper":"^2.0.2","lodash.merge":"^4.6.2","node-preload":"^0.2.1","package-hash":"^4.0.0","set-blocking":"^2.0.0","side-channel":"^1.0.5","string-width":"^4.2.3","test-exclude":"^6.0.0","undici-types":"^5.26.5","which-module":"^2.0.1","color-convert":"^1.9.3","function-bind":"^1.1.2","get-intrinsic":"^1.2.4","indent-string":"^4.0.0","internal-slot":"^1.0.7","is-typedarray":"^1.0.0","node-releases":"^2.0.14","object.assign":"^4.1.5","release-zalgo":"^1.0.0","shebang-regex":"^3.0.0","wrap-ansi-cjs":"^7.0.0","balanced-match":"^1.0.2","browser-stdout":"^1.3.1","eastasianwidth":"^0.2.0","find-cache-dir":"^3.3.2","is-binary-path":"^2.1.0","is-core-module":"^2.13.1","is-date-object":"^1.0.5","is-typed-array":"^1.1.13","normalize-path":"^3.0.0","object-inspect":"^1.13.1","strip-ansi-cjs":"^6.0.1","to-regex-range":"^5.0.1","tsconfig-paths":"^3.15.0","yargs-unparser":"^1.6.0","aggregate-error":"^3.1.0","brace-expansion":"^1.1.11","es-to-primitive":"^1.2.1","get-caller-file":"^2.0.5","has-tostringtag":"^1.0.2","is-array-buffer":"^3.0.4","safe-regex-test":"^1.0.3","shebang-command":"^2.0.0","unbox-primitive":"^1.0.2","append-transform":"^2.0.0","cjs-module-lexer":"^1.2.3","foreground-child":"^2.0.0","get-package-type":"^0.1.0","is-negative-zero":"^2.0.3","is-number-object":"^1.0.7","istanbul-reports":"^3.1.7","path-is-absolute":"^1.0.1","process-on-spawn":"^1.0.0","string-width-cjs":"^4.2.3","binary-extensions":"^2.2.0","caching-transform":"^4.0.0","define-properties":"^1.2.1","is-boolean-object":"^1.1.2","istanbul-lib-hook":"^3.0.0","require-directory":"^2.1.1","safe-array-concat":"^1.1.0","set-function-name":"^2.0.2","which-typed-array":"^1.1.14","convert-source-map":"^1.9.0","es-define-property":"^1.0.0","es-set-tostringtag":"^2.0.3","lodash.flattendeep":"^4.4.0","source-map-support":"^0.5.21","to-fast-properties":"^2.0.0","typed-array-buffer":"^1.0.2","typed-array-length":"^1.0.5","istanbul-lib-report":"^3.0.1","set-function-length":"^1.2.1","define-data-property":"^1.1.4","electron-to-chromium":"^1.4.681","escape-string-regexp":"^1.0.5","functions-have-names":"^1.2.3","import-in-the-middle":"^1.7.1","typedarray-to-buffer":"^3.1.5","istanbul-lib-coverage":"^3.2.2","require-in-the-middle":"^7.2.0","require-main-filename":"^2.0.0","string.prototype.trim":"^1.2.8","which-boxed-primitive":"^1.0.2","array.prototype.reduce":"^1.0.6","available-typed-arrays":"^1.0.7","get-symbol-description":"^1.0.2","is-shared-array-buffer":"^1.0.3","node-environment-flags":"^1.0.6","regexp.prototype.flags":"^1.5.2","update-browserslist-db":"^1.0.13","acorn-import-assertions":"^1.9.0","function.prototype.name":"^1.1.6","is-fullwidth-code-point":"^3.0.0","istanbul-lib-instrument":"^4.0.3","typed-array-byte-length":"^1.0.1","typed-array-byte-offset":"^1.0.2","array-buffer-byte-length":"^1.0.1","has-property-descriptors":"^1.0.2","istanbul-lib-processinfo":"^2.0.3","module-details-from-path":"^1.0.3","string.prototype.trimend":"^1.0.7","default-require-extensions":"^3.0.1","possible-typed-array-names":"^1.0.0","string.prototype.trimstart":"^1.0.7","arraybuffer.prototype.slice":"^1.0.3","es-array-method-boxes-properly":"^1.0.0","supports-preserve-symlinks-flag":"^1.0.0","object.getownpropertydescriptors":"^2.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^10.3.10","lerna":"6.6.2","eslint":"8.7.0","semver":"^7.6.0","prettier":"2.8.8","minimatch":"^9.0.3","typescript":"4.4.4","lerna-changelog":"2.2.0","eslint-plugin-node":"11.1.0","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.27.5","eslint-config-prettier":"8.8.0","eslint-plugin-prettier":"4.2.1","@typescript-eslint/parser":"5.8.1","eslint-config-airbnb-base":"15.0.0","@typescript-eslint/eslint-plugin":"5.8.1"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-runtime-node_0.7.1-test_1726613127620_0.1552975929698588","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"@bradborgald/instrumentation-runtime-node","version":"0.7.0","description":"OpenTelemetry Node.js Performance measurement API automatic instrumentation package","main":"build/src/index.js","types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git"},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-runtime-node","scripts":{"clean":"rimraf build/*","compile":"tsc -p .","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","prewatch":"npm run precompile","prepublishOnly":"npm run compile","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","version:update":"node ../../../scripts/version-update.js"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=17.4.0"},"keywords":["perf_hooks","instrumentation","nodejs","opentelemetry"],"publishConfig":{"access":"public"},"dependencies":{"@opentelemetry/instrumentation":"^0.53.0"},"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^1.20.0","@types/mocha":"^10.0.6","@types/node":"^22.5.5","mocha":"7.2.0","nyc":"^15.1.0","rimraf":"5.0.10","ts-mocha":"10.0.0","typescript":"^4.9.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_id":"@bradborgald/instrumentation-runtime-node@0.7.0","gitHead":"f57729c1e6d06df605ab77960d14a1a08a543d57","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-DMgATAc7ihj1OfsXZo/cTljefpIxB82vi22QIycFBiE+Pqoz26NJNyPqLEG7PEyhBfvvyJYOgtVZF7cjBkDGJA==","shasum":"83c70a1d5ed74ece23107412a5482c0184a9ef8b","tarball":"https://registry.npmjs.org/@bradborgald/instrumentation-runtime-node/-/instrumentation-runtime-node-0.7.0.tgz","fileCount":45,"unpackedSize":87833,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcvhJj9mOdF+6vKCQAnvyMJQUdC1v1fiD2ysPupxLZwAIgHQmgDvCZ57+sL2BlTpBqBADUbw9YoXYJoNA4ox2dai0="}]},"_npmUser":{"name":"bradborgald","email":"bradborgald@cyberqp.com"},"directories":{},"maintainers":[{"name":"bradborgald","email":"bradborgald@cyberqp.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/instrumentation-runtime-node_0.7.0_1726673399252_0.9489329388551246"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-17T22:45:27.526Z","modified":"2024-09-18T15:29:59.583Z","0.7.1-test":"2024-09-17T22:45:28.046Z","0.7.0":"2024-09-18T15:29:59.399Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-runtime-node","keywords":["perf_hooks","instrumentation","nodejs","opentelemetry"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git"},"description":"OpenTelemetry Node.js Performance measurement API automatic instrumentation package","maintainers":[{"name":"bradborgald","email":"bradborgald@cyberqp.com"}],"readme":"# OpenTelemetry Node.js Runtime Metrics Instrumentation\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic metric instrumentation that exposes measurements from the [Performance measurement APIs](https://nodejs.org/api/perf_hooks.html) (i.e. `perf_hooks`).\nWhile currently it is limited to metrics, it may be modified to produce other signals in the future.\n\n## Supported Versions\n\n- Node.js `>=14.10`\n\n<!-- - 14.6.0 - this package uses _private properties_ -->\n\n## Example\n\n```bash\nnpm install --save @opentelemetry/sdk-node @opentelemetry/exporter-prometheus\nnpm install --save @opentelemetry/instrumentation-runtime-node\n```\n\n```js\nimport { NodeSDK } from '@opentelemetry/sdk-node';\nimport { PrometheusExporter } from '@opentelemetry/exporter-prometheus';\nimport { RuntimeNodeInstrumentation } from '@opentelemetry/instrumentation-runtime-node';\n\nconst prometheusExporter = new PrometheusExporter({\n  port: 9464,\n  startServer: true\n});\n\nconst sdk = new NodeSDK({\n  metricReader: prometheusExporter,\n  instrumentations: [new RuntimeNodeInstrumentation({\n    monitoringPrecision: 5000,\n  })],\n});\n\nsdk.start()\n```\n\n[`NodeSDK`](https://www.npmjs.com/package/@opentelemetry/sdk-node) is the full OpenTelemetry SDK for Node.js that is a layer of abstraction on top of the `@opentelemetry/sdk-metrics` and `@opentelemetry/sdk-trace-*` packages. By specifying `metricReader`, it will initialize the metrics SDK and creates a `MeterProvider`. [`@opentelemetry/exporter-prometheus`](https://www.npmjs.com/package/@opentelemetry/exporter-prometheus) will output metrics collected by registered instrumentation on a `/metrics` endpoint.\n\nGo to [`localhost:9464/metrics`](http://localhost:9464/metrics), and you should see:\n\n```txt\n# HELP nodejs_performance_event_loop_utilization Event loop utilization\n# UNIT nodejs_performance_event_loop_utilization 1\n# TYPE nodejs_performance_event_loop_utilization gauge\nnodejs_performance_event_loop_utilization 0.010140079547955264\n```\n\n> Metrics will only be exported after it has collected two ELU readings (at least approximately `RuntimeNodeInstrumentationConfig.monitoringPrecision` milliseconds after initialization). Otherwise, you may see:\n>\n> ```txt\n> # no registered metrics\n> ```\n\n### Options\n\n`RuntimeNodeInstrumentation`'s constructor accepts the following options:\n\n| name | type | unit | default | description |\n|---|---|---|---|---|\n| [`monitoringPrecision`](./src/types.ts#L25) | `int` | millisecond | `5000` | The approximate number of milliseconds for which to calculate event loop utilization averages. A larger value will result in more accurate averages at the expense of less granular data. Should be set to below the scrape interval of your metrics collector to avoid duplicated data points. |\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-contrib/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/instrumentation-pg\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-pg.svg\n","readmeFilename":"README.md"}