{"_id":"@opentelemetry/instrumentation-host-metrics","_rev":"4-e4741fec25cbe2dc9a7f129048d9ed62","name":"@opentelemetry/instrumentation-host-metrics","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"@opentelemetry/instrumentation-host-metrics","version":"0.2.0","keywords":["opentelemetry","metrics","nodejs","instrumentation","plugin"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/instrumentation-host-metrics@0.2.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-host-metrics#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"20cea70fb5620a41b0b30fedc3d52751801f9b3c","tarball":"https://registry.npmjs.org/@opentelemetry/instrumentation-host-metrics/-/instrumentation-host-metrics-0.2.0.tgz","fileCount":23,"integrity":"sha512-NIttCEOLdg1ebbDiJpCf0Ly1OGIa10isesik+K2dnXy2P99q4muUFjpaLtTnhkENrt9SmR0Zrxzq7B+W/VNWyw==","signatures":[{"sig":"MEQCIAYYWk9RmAdlZi5EraQfITBFxtQU3WToE7Zl/NVgheykAiBxxTr5TxmpXlnjgDYnJLq59GGjlFIF1kX/NU94SnvbHQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84130},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"4e52a9053029304f271b7dbe1b07e7fb2b987e30","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","test":"nyc mocha test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-host-metrics"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-host-metrics"},"_npmVersion":"11.12.0","description":"OpenTelemetry Host Metrics instrumentation for Node.js","directories":{},"_nodeVersion":"20.19.6","dependencies":{"systeminformation":"^5.31.6","@opentelemetry/instrumentation":"^0.219.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-host-metrics_0.2.0_1781190004516_0.8611567698129061","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@opentelemetry/instrumentation-host-metrics","version":"0.3.0","keywords":["opentelemetry","metrics","nodejs","instrumentation","plugin"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/instrumentation-host-metrics@0.3.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-host-metrics#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"c598f4f7f8cf0ff626c3641a950f714372a50784","tarball":"https://registry.npmjs.org/@opentelemetry/instrumentation-host-metrics/-/instrumentation-host-metrics-0.3.0.tgz","fileCount":24,"integrity":"sha512-6Z7xjnOd8xpwFRv85AcsXid7RwjyMohu1XJ8xoduMjbOvXjTSENWm3G279dCY/nJQfO2JKo+ZpG3v0WW+JhNOA==","signatures":[{"sig":"MEUCICwPctrn9n87ywlkRb6BpvMC75esMCZGn++DgVhXDWVLAiEAmOgHVzwQNhXKj2a0qNK67reGg8e5fs8hLIv3hahucig=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-host-metrics@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":95544},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"8d7daea5c404855f474a82f4296640af8b93b64c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","test":"nyc mocha test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-host-metrics"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e68f87e-379d-42d7-9269-19c542634dad"}},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-host-metrics"},"_npmVersion":"lerna/9.0.7/node@v24.18.0+x64 (linux)","description":"OpenTelemetry Host Metrics instrumentation for Node.js","directories":{},"_nodeVersion":"24.18.0","dependencies":{"systeminformation":"^5.31.6","@opentelemetry/instrumentation":"^0.220.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-host-metrics_0.3.0_1783067531053_0.48461157255996024","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@opentelemetry/instrumentation-host-metrics","version":"0.4.0","keywords":["opentelemetry","metrics","nodejs","instrumentation","plugin"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/instrumentation-host-metrics@0.4.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-host-metrics#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"4a510766829c201cbed9c7536cd8de25abcb0288","tarball":"https://registry.npmjs.org/@opentelemetry/instrumentation-host-metrics/-/instrumentation-host-metrics-0.4.0.tgz","fileCount":24,"integrity":"sha512-jnFyX2sTn2B+9mjsL3qgAHzpxdaia4/FV2GSlf9QrpaiMi6O0M0lA9JZTsf4FTvuOwrIngCk+MeVXjsxgBXXyg==","signatures":[{"sig":"MEYCIQD2I93uKkLbDUoCv2Rfqo5u3BLP5GzFACuUFyoJmDz6zAIhAMqN+qlrqQIZOT553Bl1z7V+joZdF5/hokzwyWafKm+C","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-host-metrics@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":95544},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"27e172a9e0d549559056ccd58f27d13467454156","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","test":"nyc mocha test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-host-metrics"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e68f87e-379d-42d7-9269-19c542634dad"}},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-host-metrics"},"_npmVersion":"lerna/9.0.7/node@v24.18.0+x64 (linux)","description":"OpenTelemetry Host Metrics instrumentation for Node.js","directories":{},"_nodeVersion":"24.18.0","dependencies":{"systeminformation":"^5.31.6","@opentelemetry/instrumentation":"^0.221.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-host-metrics_0.4.0_1784828653415_0.8152472499799073","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"_id":"@opentelemetry/instrumentation-host-metrics@0.5.0","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"be07a627e2228068c2da62a6e70e319f45cb4ab4","tarball":"https://registry.npmjs.org/@opentelemetry/instrumentation-host-metrics/-/instrumentation-host-metrics-0.5.0.tgz","fileCount":24,"integrity":"sha512-rAw5lmY2u3bwUFohRtR4ZYNDnhMTiSeQqq8BB4Bo+aJQ+7vIOOwW/3d4awLPMDQ69VeA5jsh+ICL5oJinrWIwA==","signatures":[{"sig":"MEUCIQDaNtSwicDo3v6tMQzPE/8UCI6l3o6tC05ziqe5lJWY9gIgfitpINQtlUFPf7HCDJWO450YqISFxhSdsvTaUKZ4aHw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9v+m37Q9fHzGiO6Qu9/w8Bku9yaZe/0GT7YXTVj0OcQIgA18lS/r+xK3uxQW6lvwSVvnsTw5MW9kuKIXO+iFih8M="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-host-metrics@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":95544},"main":"build/src/index.js","name":"@opentelemetry/instrumentation-host-metrics","types":"build/src/index.d.ts","author":{"name":"OpenTelemetry Authors"},"engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"932fc967b142a8eb47d306fe92107b62962099f0","license":"Apache-2.0","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","test":"nyc mocha test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","compile":"tsc -p .","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-host-metrics"},"version":"0.5.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e68f87e-379d-42d7-9269-19c542634dad"}},"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-host-metrics#readme","keywords":["opentelemetry","metrics","nodejs","instrumentation","plugin"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-host-metrics"},"_npmVersion":"lerna/9.0.7/node@v24.19.0+x64 (linux)","description":"OpenTelemetry Host Metrics instrumentation for Node.js","directories":{},"maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"_nodeVersion":"24.19.0","dependencies":{"systeminformation":"^5.31.6","@opentelemetry/instrumentation":"^0.222.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-metrics":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/instrumentation-host-metrics_0.5.0_1788208779867_0.9541927092101559"}}},"time":{"created":"2026-06-11T15:00:04.357Z","modified":"2026-08-31T20:39:40.305Z","0.2.0":"2026-06-11T15:00:04.660Z","0.3.0":"2026-07-03T08:32:11.202Z","0.4.0":"2026-07-23T17:44:13.553Z","0.5.0":"2026-08-31T20:39:39.970Z"},"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/packages/instrumentation-host-metrics#readme","keywords":["opentelemetry","metrics","nodejs","instrumentation","plugin"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-host-metrics"},"description":"OpenTelemetry Host Metrics instrumentation for Node.js","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"readme":"# OpenTelemetry Host Metrics Instrumentation for Node.js\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic collection of host metrics for the Node.js process and operating system, including CPU, memory, and network. It is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle (disabled by default; enable via `OTEL_NODE_ENABLED_INSTRUMENTATIONS`).\n\nCompatible with OpenTelemetry JS API and SDK `1.0+`.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/instrumentation-host-metrics\n```\n\n## Supported Versions\n\n- Node.js `^18.19.0 || >=20.6.0`\n\n## Usage\n\n```js\nconst { NodeSDK } = require('@opentelemetry/sdk-node');\nconst { HostMetricsInstrumentation } = require('@opentelemetry/instrumentation-host-metrics');\n\nconst sdk = new NodeSDK({\n  instrumentations: [new HostMetricsInstrumentation()],\n});\n\nsdk.start();\n```\n\n### Host Metrics Instrumentation Options\n\n| Option         | Type       | Description                                                                                                                                                                                                                                                            |\n|----------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `metricGroups` | `string[]` | Optionally restrict collection to one or more metric groups (see [Semantic Conventions](#semantic-conventions)). When unset, all metrics are collected. For example, `metricGroups: ['process.cpu', 'process.memory']` limits collection to those metrics only. |\n\n## Semantic Conventions\n\nMetrics collected:\n\n| Metric                          | Short Description                                         |\n|---------------------------------|-----------------------------------------------------------|\n| **Group `system.cpu`**          |                                                           |\n| `system.cpu.time`               | Seconds each logical CPU spent on each mode               |\n| `system.cpu.utilization`        | CPU usage (0-1)                                           |\n| **Group `system.memory`**       |                                                           |\n| `system.memory.usage`           | Reports memory in use by state                            |\n| `system.memory.utilization`     | Memory usage (0-1)                                        |\n| **Group `system.network`**      |                                                           |\n| `system.network.packet.dropped` | Count of packets dropped                                  |\n| `system.network.errors`         | Count of network errors detected                          |\n| `system.network.io`             | Bytes transmitted and received                            |\n| **Group `process.cpu`**         |                                                           |\n| `process.cpu.time`              | Total CPU seconds                                         |\n| `process.cpu.utilization`       | Difference in process.cpu.time since the last measurement |\n| **Group `process.memory`**      |                                                           |\n| `process.memory.usage`          | The amount of physical memory in use                      |\n\nThe \"Group\" names are the values accepted by the `metricGroups` configuration option.\n\nAttributes collected:\n\n| Attribute              | Short Description                  |\n|------------------------|------------------------------------|\n| `cpu.logical_number`   | The logical CPU number             |\n| `cpu.mode`             | The mode of the CPU                |\n| `system.memory.state`  | The memory state                   |\n| `system.device`        | The device identifier              |\n| `network.io.direction` | The network IO operation direction |\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-host-metrics\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-host-metrics.svg\n","readmeFilename":"README.md"}