Npm package including OTEL connections
  • TypeScript 77.1%
  • JavaScript 22.2%
  • Makefile 0.7%
Find a file
2025-08-16 20:32:21 +02:00
.gitea Fix: Removed cache in favor of redundant jobs. Caching system is borked 2025-08-16 20:32:21 +02:00
__tests__ Feat: Migrated github to gitea 2025-08-09 07:56:34 +02:00
src Feat: Added metrics system 2025-03-22 22:45:02 +01:00
types Initial commit 2025-03-22 19:58:29 +00:00
.editorconfig Initial commit 2025-03-22 19:58:29 +00:00
.gitignore Fix: Fixed caching on pipelines, updated dependencies, removed lib from git 2025-08-16 13:13:46 +02:00
.npmrc Fix: Fixed caching on pipelines, updated dependencies, removed lib from git 2025-08-16 13:13:46 +02:00
.prettierrc Initial commit 2025-03-22 19:58:29 +00:00
eslint.config.mjs Fix: Fixed caching on pipelines, updated dependencies, removed lib from git 2025-08-16 13:13:46 +02:00
licence.md Initial commit 2025-03-22 19:58:29 +00:00
makefile Initial commit 2025-03-22 19:58:29 +00:00
package-lock.json Fix: Fixed caching on pipelines, updated dependencies, removed lib from git 2025-08-16 13:13:46 +02:00
package.json Fix: Fixed caching on pipelines, updated dependencies, removed lib from git 2025-08-16 13:13:46 +02:00
README.md Feat: Added metrics system 2025-03-22 22:45:02 +01:00
rollup.config.js Initial commit 2025-03-22 19:58:29 +00:00
tsconfig.json Initial commit 2025-03-22 19:58:29 +00:00
tsconfig.test.json Initial commit 2025-03-22 19:58:29 +00:00

Monsters - metrics

This app is a npm package, that initializes metrics connections in Monsters project.

How to set up

export NODE_METRICS_ADDRESS with address for otel collector

How to use

Simply include the metrics file while starting your application. Example

NODE_ENV=development node --import ./metrics.js --experimental-loader=@opentelemetry/instrumentation/hook.mjs ./main.js  

Where metrics.js is this files location

In order for metrics to work, import promClient from this package and create endpoint /metrics, which will run client.metrics(). Example

    const app = express();

    app.get('/metrics', async (_req, res) => {
      res.set('Content-Type', client.contentType);
      res.end(client.metrics());
    });