@massiveinfinity/slo-exporter-prometheus-push-gateway
TypeScript icon, indicating that this package has built-in type declarations

1.0.1-mi.3 • Public • Published

@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

  1. 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

Readme

Keywords

none

Package Sidebar

Install

npm i @massiveinfinity/slo-exporter-prometheus-push-gateway

Weekly Downloads

0

Version

1.0.1-mi.3

License

MIT

Unpacked Size

21.2 kB

Total Files

7

Last publish

Collaborators

  • barrymi
  • khaishien