From 16e8b2d824c36c2bd4e1a13e251b6e590e3a8a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=A7?= Date: Tue, 27 Feb 2024 14:41:10 +0100 Subject: [PATCH 1/2] Prepare release 0.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b74b886..275f74a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "instrument-pipeline", - "version": "0.0.0", + "version": "0.1.0", "description": "Export job execution metrics to a Prometheus aggregation gateway", "type": "module", "scripts": { From 6a5bc13495f7fa4840c3c455ccd4c3ae942bfd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=A7?= Date: Thu, 29 Feb 2024 00:22:18 +0100 Subject: [PATCH 2/2] Update readme --- README.md | 20 ++++++++++++++++---- package.json | 2 +- scripts/simulate-build.js | 5 ----- 3 files changed, 17 insertions(+), 10 deletions(-) delete mode 100644 scripts/simulate-build.js diff --git a/README.md b/README.md index 63b984a..bebbbd7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ ![GitHub_headerImage](https://user-images.githubusercontent.com/3262610/221191767-73b8a8d9-9f8b-440e-8ab6-75cb3c82f2bc.png) -This GitHub action allows you to instrument a pipeline and track number of runs and their duration; the data is then exported to a prometheus aggregation gateway, like [prom-aggregation-gateway](https://github.com/zapier/prom-aggregation-gateway). +This GitHub action allows you to instrument a pipeline and track number of runs and their duration; the data is then exported to a prometheus aggregation gateway, such as one of these: + +- [Prometheus Pushgateway](https://github.com/prometheus/pushgateway) +- [Gravel Gateway](https://github.com/sinkingpoint/prometheus-gravel-gateway/tree/master) +- [Prometheus Aggregation Gateway](https://github.com/zapier/prom-aggregation-gateway) + Due to limitations of GitHub actions, tracking success rate is only possible via api, so it is outside the scope of this action (for now). ## Usage @@ -11,9 +16,10 @@ Just add the action as a step to your job, and provide the url of the prometheus steps: - uses: autometrics-dev/instrument-pipeline@v0 with: - pushgateway: http://pushgateway.example.com/metrics + pushgateway: http://pushgateway.example.com + gatewaytype: prometheus - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 20 - run: npm install @@ -26,7 +32,13 @@ Now every time the action runs, it will send the duration (and increase the run ### `pushgateway` -**Required** The url of the prometheus aggregation gateway, with the `/metrics` endpoint. +**Required** + +URL to the aggregation gateway, for example `http://localhost:9091`. + +### `gatewaytype` + +Type of the aggregation gateway, one of `prometheus`, `gravel`, or `zapier`. Currently only changes the url format in case of prometheus. ### `buckets` diff --git a/package.json b/package.json index 1253007..6d99e60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "instrument-pipeline", - "version": "0.1.0", + "version": "0.0.0", "description": "Export job execution metrics to a Prometheus aggregation gateway", "type": "module", "scripts": { diff --git a/scripts/simulate-build.js b/scripts/simulate-build.js deleted file mode 100644 index 95ba7ce..0000000 --- a/scripts/simulate-build.js +++ /dev/null @@ -1,5 +0,0 @@ -const awaitableTimeout = (ms) => { - return new Promise((resolve) => setTimeout(resolve, ms)); -}; - -await awaitableTimeout(12345);