Skip to content

Commit 63a907d

Browse files
author
あで
committedJul 18, 2023
Add configurable buckets
1 parent 54c82b6 commit 63a907d

10 files changed

+444
-52
lines changed
 

‎.github/release.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
changelog:
2+
categories:
3+
- title: 💥
4+
labels:
5+
- Semver-Major
6+
- title: 🛠️
7+
labels:
8+
- Semver-Minor
9+
- title: 🪲
10+
labels:
11+
- Semver-Patch
12+
- title: 🤔
13+
- "*"

‎.github/workflows/run-from-repo.yml

-19
This file was deleted.

‎README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,23 @@ Just add the action as a step to your job, and provide the url of the prometheus
1111
steps:
1212
- uses: autometrics-dev/instrument-pipeline@v1
1313
with:
14-
pushgateway: "http://pushgateway.example.com/metrics"
14+
pushgateway: http://pushgateway.example.com/metrics
1515
- uses: actions/checkout@v3
1616
- uses: actions/setup-node@v3
1717
with:
18-
node-version: "20"
18+
node-version: 20
1919
- run: npm install
2020
- run: npm run build
2121
```
2222
2323
Now every time the action runs, it will send the duration (and increase the run counter) of the run to the aggregation gateway.
24+
25+
## Inputs
26+
27+
### `pushgateway`
28+
29+
**Required** The url of the prometheus aggregation gateway, with the `/metrics` endpoint.
30+
31+
### `buckets`
32+
33+
Array of buckets to use for the histogram. For example, `[0, 1, 2, 5, 10, +Infinity]`.

‎action.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
name: "instrument-pipeline-action"
2-
description: ""
3-
author: "Fiberplane<info@fiberplane.com>"
1+
name: "Instrument pipeline"
2+
description: "Export job execution metrics to a Prometheus aggregation gateway"
3+
author: "autometrics-dev"
4+
branding:
5+
icon: "clock"
6+
color: "purple"
47
inputs:
58
pushgateway:
69
required: true
7-
description: "Full URL to the aggregation gateway (like zapier's)"
10+
description: "Full URL to the aggregation gateway (like zapier's), including the /metrics suffix"
11+
buckets:
12+
required: false
13+
description: "Comma separated list of buckets for duration histogram, with or without the brackets []"
814
runs:
915
using: "node16"
10-
main: "main/index.js"
11-
post: "post/index.js"
16+
main: "main.js"
17+
post: "post.js"

0 commit comments

Comments
 (0)
Please sign in to comment.