1.0.1 • Published 3 months ago
@autometrics/exporter-prometheus-push-gateway v1.0.1
@autometrics/exporter-prometheus-push-gateway
Export metrics by pushing them to a Prometheus-compatible push gateway.
For this exporter to work, you need to have a Prometheus-compatible push gateway, such as: https://github.com/sinkingpoint/prometheus-gravel-gateway
Documentation
Full documentation for the autometrics
library can be found here:
https://github.com/autometrics-dev/autometrics-ts.
Installation
# npm
npm install @autometrics/autometrics @autometrics/exporter-prometheus-push-gateway
# yarn
yarn add @autometrics/autometrics @autometrics/exporter-prometheus-push-gateway
# pnpm
pnpm add @autometrics/autometrics @autometrics/exporter-prometheus-push-gateway
Usage
- Anywhere in your source code:
import { autometrics } from "@autometrics/autometrics";
import { init } from "@autometrics/exporter-prometheus-push-gateway";
init({ url: "https://<your-push-gateway>" });
async function createUserRaw(payload: User) {
// ...
}
const createUser = autometrics(createUserRaw);
// ^ instrumented function
1.0.1
3 months ago
1.0.0
5 months ago
0.7.2-beta.0
7 months ago
0.7.1
8 months ago
0.7.0
8 months ago
0.7.0-beta10
8 months ago
0.7.0-beta9
8 months ago
0.7.0-beta7
8 months ago
0.7.0-beta6
8 months ago
0.7.0-beta5
8 months ago
0.7.0-beta4
8 months ago