diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc68aca..8667d9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,13 @@ jobs: - run: npm run lint - run: npm test - run: npm run test-types + - name: Generate coverage + run: make coverage + - name: Upload coverage to Coveralls + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + file: coverage/lcov.info publish: needs: test diff --git a/README.md b/README.md index d555012..496cbab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![build status](https://travis-ci.org/jochen-schweizer/express-prom-bundle.png)](https://travis-ci.org/jochen-schweizer/express-prom-bundle) [![Coverage Status](https://coveralls.io/repos/github/jochen-schweizer/express-prom-bundle/badge.svg?branch=master)](https://coveralls.io/github/jochen-schweizer/express-prom-bundle?branch=master) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://www.tldrlegal.com/l/mit) [![NPM version](https://badge.fury.io/js/express-prom-bundle.png)](http://badge.fury.io/js/express-prom-bundle) +[![CI](https://github.com/BreizhHardware/express-prom-bundle/actions/workflows/release.yml/badge.svg)](https://github.com/BreizhHardware/express-prom-bundle/actions/workflows/release.yml) [![Coverage Status](https://coveralls.io/repos/github/BreizhHardware/express-prom-bundle/badge.svg?branch=main)](https://coveralls.io/github/BreizhHardware/express-prom-bundle?branch=main) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://www.tldrlegal.com/l/mit) [![NPM version](https://badge.fury.io/js/%40breizhhardware%2Fexpress-prom-bundle.png)](http://badge.fury.io/js/%40breizhhardware%2Fexpress-prom-bundle) # express prometheus bundle @@ -17,13 +17,13 @@ Included metrics: ## Install ``` -npm install prom-client express-prom-bundle +npm install prom-client @breizhhardware/express-prom-bundle ``` ## Sample Usage ```javascript -const promBundle = require("express-prom-bundle"); +const promBundle = require("@breizhhardware/express-prom-bundle"); const app = require("express")(); const metricsMiddleware = promBundle({includeMethod: true}); @@ -182,7 +182,7 @@ setup std. metrics but exclude `up`-metric: ```javascript const express = require("express"); const app = express(); -const promBundle = require("express-prom-bundle"); +const promBundle = require("@breizhhardware/express-prom-bundle"); // calls to this route will not appear in metrics // because it's applied before promBundle @@ -207,7 +207,7 @@ See an [advanced example on github](https://github.com/jochen-schweizer/express- ## koa v2 example ```javascript -const promBundle = require("express-prom-bundle"); +const promBundle = require("@breizhhardware/express-prom-bundle"); const Koa = require("koa"); const c2k = require("koa-connect"); const metricsMiddleware = promBundle({/* options */ }); @@ -228,7 +228,7 @@ which returns an aggregate of all metrics from all the workers. ``` javascript const cluster = require('cluster'); -const promBundle = require('express-prom-bundle'); +const promBundle = require('@breizhhardware/express-prom-bundle'); const promClient = require('prom-client'); const numCPUs = Math.max(2, require('os').cpus().length); const express = require('express'); diff --git a/package-lock.json b/package-lock.json index 9949133..c6e2ac0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@breizhhardware/express-prom-bundle", - "version": "8.0.4", + "version": "8.0.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@breizhhardware/express-prom-bundle", - "version": "8.0.4", + "version": "8.0.5", "license": "MIT", "dependencies": { "@types/express": "^5.0.0", diff --git a/package.json b/package.json index e9ceb85..2ac61dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@breizhhardware/express-prom-bundle", - "version": "8.0.4", + "version": "8.0.5", "description": "express middleware with popular prometheus metrics in one bundle", "main": "src/index.js", "keywords": [