Skip to content

Commit 142e4e6

Browse files
author
あで
committed
Release 0.1.0
1 parent 7e3eec5 commit 142e4e6

File tree

5 files changed

+418
-7782
lines changed

5 files changed

+418
-7782
lines changed

action.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ branding:
77
inputs:
88
pushgateway:
99
required: true
10-
description: "Full URL to the aggregation gateway (like zapier's), including the /metrics suffix"
10+
description: "URL to the aggregation gateway, for example `http://localhost:9091`"
11+
gatewaytype:
12+
required: false
13+
description: "Type of the aggregation gateway, one of `prometheus`, `gravel`, or `zapier`. Currently only changes the url format in case of prometheus"
1114
buckets:
1215
required: false
1316
description: "Comma separated list of buckets for duration histogram, with or without the brackets []"
1417
runs:
15-
using: "node16"
18+
using: "node20"
1619
main: "main/index.js"
1720
post: "post/index.js"

main/index.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ var __webpack_exports__ = {};
1010
const external_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs");
1111
;// CONCATENATED MODULE: external "os"
1212
const external_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os");
13-
;// CONCATENATED MODULE: ./src/const.ts
13+
;// CONCATENATED MODULE: external "perf_hooks"
14+
const external_perf_hooks_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("perf_hooks");
15+
;// CONCATENATED MODULE: ./src/metrics/const.ts
1416
const TMP_VAR_NAME = "AUTOMETRICS_START";
17+
const TMP_VAR_GITHUB_NAME = `STATE_${TMP_VAR_NAME}`;
18+
const HISTOGRAM_NAME = "workflow.jobs.duration";
19+
const COUNTER_NAME = "workflow.jobs.count";
1520

1621
;// CONCATENATED MODULE: ./src/main.ts
1722

1823

1924

20-
external_fs_namespaceObject.appendFileSync(process.env.GITHUB_STATE, `${TMP_VAR_NAME}=${new Date().valueOf()}${external_os_namespaceObject.EOL}`, {
25+
26+
(0,external_fs_namespaceObject.appendFileSync)(process.env.GITHUB_STATE, `${TMP_VAR_NAME}=${external_perf_hooks_namespaceObject.performance.now()}${external_os_namespaceObject.EOL}`, {
2127
encoding: "utf8",
2228
});
2329

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "npx concurrently -- \"npm run build:main\" \"npm run build:post\"",
88
"build:main": "ncc build src/main.ts -o main",
99
"build:post": "ncc build src/post.ts -o post",
10-
"test": "tsc"
10+
"build:test": "ncc build src/test.ts -o test"
1111
},
1212
"repository": {
1313
"type": "git",
@@ -23,14 +23,14 @@
2323
},
2424
"homepage": "https://github.com/autometrics-dev/instrument-pipeline#readme",
2525
"dependencies": {
26-
"@opentelemetry/exporter-prometheus": "^0.40.0",
27-
"@opentelemetry/sdk-metrics": "^1.14.0",
28-
"node-fetch": "^3.3.1"
26+
"@opentelemetry/exporter-prometheus": "^0.48.0",
27+
"@opentelemetry/sdk-metrics": "^1.21.0"
2928
},
3029
"devDependencies": {
31-
"@tsconfig/strictest": "^2.0.1",
32-
"@types/node": "^20.4.1",
33-
"@vercel/ncc": "^0.36.1",
30+
"@tsconfig/strictest": "^2.0.3",
31+
"@types/node": "^20.11.22",
32+
"@vercel/ncc": "^0.38.1",
33+
"concurrently": "^8.2.2",
3434
"typescript": "next"
3535
}
3636
}

0 commit comments

Comments
 (0)