ligo/tools/webide/packages/server/src/metrics.ts
Maksym Bykovskyy 9de281e7ef Add build info to ide metrics and state
- Add ligo_webide_build_info metric that surface revision and branch from CI
- Add  a version sub state which contains the current revision and branch of frontend

- Added back express-prometheus-middleware
2020-04-23 16:46:23 +00:00

8 lines
254 B
TypeScript

const client = require('prom-client');
const gauge = new client.Gauge({
name: 'ligo_webide_build_info',
help: 'Ligo Web IDE build info',
labelNames: ['branch', 'revision']
}).labels(process.env['GIT_TAG'], process.env['GIT_COMMIT']);
gauge.set(1);