{"id":15017944,"url":"https://github.com/carvjs/metrics-process","last_synced_at":"2026-01-04T23:02:40.344Z","repository":{"id":143736947,"uuid":"306013734","full_name":"carvjs/metrics-process","owner":"carvjs","description":"Telemetry metrics for Node.JS","archived":false,"fork":false,"pushed_at":"2020-11-03T08:49:23.000Z","size":319,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T20:58:58.689Z","etag":null,"topics":["metrics","open-telemetry","prometheus","telemetry"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carvjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-21T12:14:31.000Z","updated_at":"2023-09-13T23:31:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"e274a9ab-0a0d-4e1b-b0ce-fbf99a6e84e2","html_url":"https://github.com/carvjs/metrics-process","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"d81eed50764d081c41c1dacb1a7519fad34ffce7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvjs%2Fmetrics-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvjs%2Fmetrics-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvjs%2Fmetrics-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvjs%2Fmetrics-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carvjs","download_url":"https://codeload.github.com/carvjs/metrics-process/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245020314,"owners_count":20548156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metrics","open-telemetry","prometheus","telemetry"],"created_at":"2024-09-24T19:51:14.013Z","updated_at":"2026-01-04T23:02:40.289Z","avatar_url":"https://github.com/carvjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @carv/metrics-process\n\n[Telemetry](https://www.npmjs.com/package/@carv/telemetry) [metrics](https://prometheus.io/) for the Node.JS process.\n\n[![License](https://flat.badgen.net/npm/license/@carv/metrics-process)](https://github.com/carvjs/metrics-process/blob/main/LICENSE)\n[![Latest Release](https://flat.badgen.net/npm/v/@carv/metrics-process?label=release)](https://www.npmjs.com/package/@carv/metrics-process)\n[![Node Version](https://flat.badgen.net/npm/node/@carv/metrics-process?color=blue)](https://nodejs.org/)\n[![Telemetry Version](https://flat.badgen.net/badge/%40carv%2Ftelemetry/1.x/blue)](https://github.com/carvjs/telemetry)\n[![Typescript](https://flat.badgen.net/badge/icon/included?icon=typescript\u0026label)](https://unpkg.com/browse/@carv/metrics-process/dist/index.d.ts)\n[![Sponsor](https://flat.badgen.net/badge/sponsored%20by/Kenoxa/2980b9)](https://www.kenoxa.com)\n\n## Installation\n\n```sh\nnpm install @carv/metrics-process\n```\n\n## Usage\n\nRegister the plugin and if needed pass to it some custom options.\n\n```js\nconst { Telemetry } = require('@carv/telemetry')\n\nconst telemetry = new Telemetry()\n\n// using the defaults\ntelemetry.use(require('@carv/metrics-process'))\n\n// with custom options\ntelemetry.use(require('@carv/metrics-process'), { /* ... Options ... */ })\n\n// using only eventLoopDelay metric\ntelemetry.use(require('@carv/metrics-process').eventLoopDelay)\n```\n\n## [API](https://github.com/carvjs/metrics-process/blob/main/docs/README.md)\n\nEach metric is exported as a [@carv/telemetry](https://www.npmjs.com/package/@carv/telemetry) plugin. The [default export](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#metrics) registers all metrics/plugins. The following plugins are available and exported by name:\n\n* [cpuUsage](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#cpuusage): Process CPU time spent in seconds\n* [eventLoopDelay](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#eventloopdelay): Approximate event loop delay in seconds\n* [eventLoopUtilization](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#eventlooputilization): ELU is similar to CPU utilization, except that it only measures event loop statistics and not CPU usage. It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait)\n* [gcDuration](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#gcduration): Garbage collection duration by kind, one of major, minor, incremental or weakcb\n* [heapSpace](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#heapspace): Statistics about the V8 heap spaces\n* [memoryUsage](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#memoryusage): Memory usage of the Node.js process\n* [startTime](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#starttime): Start time of the process since unix epoch in seconds\n* [uptime](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#uptime): The number of seconds the current Node.js process has been running\n* [version](https://github.com/carvjs/metrics-process/blob/main/docs/README.md#version): Node.js version info\n\n## Contribute\n\nThanks for being willing to contribute!\n\n**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)\n\nWe are following the [Conventional Commits](https://www.conventionalcommits.org) convention.\n\n### Develop\n\n- `yarn test`: Run test suite\n- `yarn build`: Generate bundles\n- `yarn lint`: Lints code\n\n## Sponsors\n\n[![Kenoxa GmbH](https://images.opencollective.com/kenoxa/9c25796/logo/68.png)](https://www.kenoxa.com) [Kenoxa GmbH](https://www.kenoxa.com)\n\n## License\n\n[MIT](https://github.com/carvjs/metrics-process/blob/main/LICENSE) © [Kenoxa GmbH](https://kenoxa.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarvjs%2Fmetrics-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarvjs%2Fmetrics-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarvjs%2Fmetrics-process/lists"}