Installation
bash
npm install @haskou/metricsOr with Yarn:
bash
yarn add @haskou/metricsThe package supports Node.js 22 and newer and ships ESM, CommonJS, source maps, and TypeScript declarations.
@Metrics supports standard TypeScript decorators without additional compiler flags. For projects that still use legacy decorators, enable:
json
{
"compilerOptions": {
"experimentalDecorators": true
}
}Optional integrations keep their vendor packages outside the core install:
- Prometheus and Grafana uses
prom-client. - Winston uses
winstonthroughLoggerPort.