Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@autometrics/exporter-prometheus-push-gateway-slim

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@autometrics/exporter-prometheus-push-gateway-slim

Export metrics by pushing them to a Prometheus-compatible gateway

latest
Source
npmnpm
Version
0.7.2-beta.0
Version published
Weekly downloads
6
Maintainers
4
Weekly downloads
 
Created
Source

@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

FAQs

Package last updated on 04 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts